Question

PayPal Express Checkout for Payflow documentation says it's possible to skip Get Express Checkout Details step by adding "useraction=commit" to URL that redirects user to PayPal. However, it also says that PAYERID parameter is returned in response to Get Express Checkout Details and required for Do Express Checkout Payment.

When I test the process without PAYERID I get "[RESPMSG] => Field format error: Invalid PayerID". Is there any way to get the PAYERID for Do Express Checkout Payment without the Get Express Checkout Details request?

Was it helpful?

Solution

The payer ID should be returned to you in the URL, along with the token, when PayPal redirects the buyer back to your site. All you need to do is grab the payer ID out of the URL. For example, if you set your RETURNURL to http://www.mysite.com/paypal_return.php, when PayPal redirects the buyer back to your site, the URL will look something like http://www.mysite.com/paypal_return.php?token=EC-1234567890ABCDEF&PayerID=ABCDEFGHIJKLM.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top