Jump to content

Recommended Posts

Hi,

I am using the following script for PayPal integration for my site.  After successful transaction the page is redirected to thankyou.php page. In this page I want to store the PayPal transaction information into my db. I am passing Invoice id & user id at the time of integration. I need these two values (invoice id & userid) in thankyou.php page. How will I get these values so that i can run my sql?

 

$userid=$_GET['userid'];
$invoiceid=$_GET['invoiceid'];
$cost=$_GET['cost'];
$_SESSION['payment_check']=time();

<input type="hidden" name="cmd" value="_xclick" />
                                  <input type="hidden" name="business" value="<?=$paypal?>" />
                                  <input type="hidden" name="item_name" value="Invoice #<?=$invoiceid?>" />
                                  <input type="hidden" name="amount" value="<?=$cost?>" />
                                  <input type="hidden" name="no_shipping" value="1" />
                                  <input type="hidden" name="no_note" value="1" />
                                  <input type="hidden" name="currency_code" value="<?=$paypal_curr?>" />
                                  <input type="hidden" name="lc" value="<?=$paypal_lang?>" />
							  <input type="hidden" name="at" value="xxxxxxxxxxxxxxxxxxxxxxxxx">  
							  <input name="Custom" id="Custom" type="hidden" value="<?=$userid?>"/>
                                  <input type="hidden" name="bn" value="PP-BuyNowBF" />
							  
							  <input name="sucess_return" id="sucess_return" type="hidden" value="<?=$site_url?>thankyou.php?key=<?=base64_encode($_SESSION['payment_check']."-a")?>" />
<input name="cancel_return" id="cancel_return" type="hidden" value="<?=$site_url?>cancel.php?key=<?=base64_encode($_SESSION['payment_check']."-b")?>" />
<input id="return" type="hidden" name="return" value="<?=$site_url?>thankyou.php?key=<?=base64_encode($_SESSION['payment_check']."-a")?>">
<input name="notify_url" id="notify_url" type="hidden" value="<?=$site_url?>thankyou.php?key=<?=base64_encode($_SESSION['payment_check']."-a")?>" />

                                  <input name="paypal" type="image" src="images/button/paypal.gif" align="right" />    

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.