1
votes

My paypal api was running ok but recently got error. I logged the detail and it shows Version is not supported.

However, I do see the Review your information page and the pay now button, the error only happens after I click the pay now button.

I then tried the curl example for paypal's doc site:

curl -s --insecure https://api-3t.sandbox.paypal.com/nvp -d "USER=platfo_1255077030_biz_api1.gmail.com&PWD=1255077037&SIGNATURE=Abg0gYcQyxQvnf2HDJkKtA-p6pqhA1k-KTYE0Gcy1diujFio4io5Vqjf&METHOD=SetExpressCheckout&VERSION=121.0&PAYMENTREQUEST_0_PAYMENTACTION=SALE&PAYMENTREQUEST_0_AMT=19&PAYMENTREQUEST_0_CURRENCYCODE=USD&cancelUrl=http://www.example.com/cancel.html&returnUrl=http://www.example.com/success.html"

and it indeed return success.

I did some further analysis,What I found is that when I call api-3t.sandbox.paypal.com/nvp, the return was successful and comes back with a token id.

Then when I call https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=xxxxI do see the "pay now" button and allow me to put email and password. But when I finally click "pay now" button, I got the error message "version is not supported"

so I am really confused on why there is an error?

Can someone help?

Many Thanks

1
Not sure but I tried at my end with the same version=121.0 and it worked fine for me in sandbox . Can you try to clear your browser's cookie and try once again ? - Eshan

1 Answers

0
votes

After communicating with paypal support, I worked out this issue now.

Apparently now every call to paypal needs a versionid in now (not sure when it started to behave like this as it was working ok for us).

In our side, we have three calls:

  1. call SetExpressCheckout
  2. call GetExpressCheckoutDetails (to retrieve some info)
  3. call DoExpressCheckoutPayment.

Before VersionId was only needed in SetExpressCheckout call.

Now we have to put version id in GetExpressCheckoutDetails and DoExpressCheckoutPayment.

This solved all the issues.