0

I need to provide a personalized page to people who make a donation via a Paypal donation button.

I've setup PDT with a PHP script on the return URL (code from https://github.com/paypal/pdt-code-samples) and it's been working fine for several weeks.

About 2 weeks ago it stopped working, although I've not changed anything on the PHP code or in my Paypal configuration. I realized that now after donation, Paypal still redirects the user to my PHP script but with no parameters in the url (e.g. no "tx", "amt", etc.), so I can't process the transaction.

As recommended on a post, I tried switching off the return address and PDT in my Paypal account, then reenable them, but with no success.

Interestingly, everything still works fine in the Paypal sandbox, my problem only occurs in production.

jjazzboss
  • 1,261
  • 8
  • 14

1 Answers1

0

Are there $_POST variables, as opposed to $_GET ?

PDT is very old, those samples are from over 8 years ago. Consider changing to the current Donate SDK.

Preston PHX
  • 27,642
  • 4
  • 24
  • 44
  • I've just checked again, both $_POST and $_GET variables are empty. Yes it's old, but it was working fine for me... – jjazzboss Feb 28 '22 at 19:22
  • And PDT is configured 'on' in the account? https://www.paypal.com/businessmanage/preferences/website .. odd, well even when it's working as expected PDT relies on the customer's browser actually returning which may not happen for a number of reasons, and so shouldn't be relied on for anything important. I'd take this as an opportunity to move to an improved integration – Preston PHX Feb 28 '22 at 19:27
  • Yes PDT is ON, and return address to the php script is working. I double-checked, even switched them OFF once and then reset to ON. – jjazzboss Feb 28 '22 at 19:45
  • I have a personal account, could it be that Paypal has changed its policy recently to require a business account ? But I guess it would not let me set PDT on/off in my Paypal settings... – jjazzboss Feb 28 '22 at 19:49
  • Might be, definitely upgrade to a business account – Preston PHX Feb 28 '22 at 21:08
  • I spent 3 hours switching to IPN, it works now. – jjazzboss Mar 01 '22 at 22:43