Jump to content

Recommended Posts

Hi all,

 

Okay, my site launches the user to the PayPal payment area, he/she pays for the purchase, and my ipn.php (instant payment notifcation) script is triggered to update my database... all of this is working fine.

 

Then the user is returned to my 'thank you' page via the $paypal['success_url'] variable. However, PayPal will not pass or $_POST any of my own variables back to me.  Bastards.

 

PayPal does have a feature called PDT (payment data transfer) which I turned on.  As straightfoward as it is, it's still a little bit too complicated for my needs.  It requires I make another http POST, pass my fixed 'identity token' along with a bunch of url data, look for the word 'SUCCESS', and then parse out all the PayPal variables.  Yuck.

 

Realistically, all I need to get back is my order number.  I can do lookups on all my SQL tables and grab all the information I could possibly ever need to create a kickass thank you page... if only I have that one piece of data:  the order number.

 

So...  is there any way to pass it while running my ipn.php script?  You can't pass $_SESSION variables from PayPal (I have no clue why) - so is there any other sneaky way I could somehow get it that you guys know of?  Or am I doomed to parsing out PayPal data that I don't really need?

 

Thanks for the help,

 

 

Link to comment
https://forums.phpfreaks.com/topic/84510-help-me-thwart-the-evil-paypal-empire/
Share on other sites

I personally have not used the PayPal thing so I am not sure on this. But it seems strange that they don't pass anything back to you. Maybe you forgot to check a setting in PayPal? I have worked with other types of payment management and all will return some data to you so it would be strange that PayPal doesn't return anything.

I've also never worked with paypal. But since you pass a success url variable to them, could you not stick the information you want back on the end of that, and retrieve it from the $_GET array? e.g:

 

$paypal['success_url'] = "thankyou.php?orderno=$orderno";

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.