Paypal PDT Issue

70 views Asked by At

2

I have PayPal PDT (Payment Data Transfer) enabled on my PayPal account, and I have auto-return turned on, pointing to a "Complete_Paypal_Order" page on my site.

When a customer makes a purchase, and they pay using PayPal's site, they are sent to a page which will redirect them back to my site within 10 seconds. If the customer waits for the redirect, the GET request to my site contains the transaction id, just as it is supposed to.

If, however, the customer clicks the link on PayPal's redirect page that says "If you are not redirected within 10 seconds, click here," the transaction id is not passed to my site.

Has anyone run across this before, and if so, do you know of a solution?

Also, just to be clear, I am aware of some of the drawbacks of PDT, but suffice to say that, for various reasons, changing to IPN or API calls is not an option for the site at this time. So, please don't suggest "just use IPN" or "just use ExpressCheckout API calls."

1

There are 1 answers

0
Preston PHX On

A very rough history of PayPal integrations (forgive me if my dates are off by several years)

PDT: Circa 2002.
IPN: Circa 2004?
Express Checkout: Circa 2006?

I won't tell you to just use something else, but I will tell you this about PDT: It is a terrible choice, completely undependable for payment confirmation purposes, and suitable for extra informational purposes only. Basically, you can use it to display some transaction details if and when if the buyer does return to your site, since in many cases they may not return at all in such an API-less integration. For example, if they pay as a guest and PayPal is legally obligated to show them a receipt and they just close their browser treating that as the final confirmation.

Anyway, have you looked in the POST (not GET) for the PDT data?

As far was what you should be using, if you really can't implement an API, a client-side JS integration is at least somewhat more reliable: https://developer.paypal.com/demo/checkout/#/pattern/client

(But, something like the Express Checkout you mentioned (using current v2/checkout/orders API for 2 routes of 'Set Up Transaction' and 'Capture Transaction', documented here, and the server demo pattern paired with those 2 routes -- will of course be most ideal, whenever it does become an option for you)