2

PayPal doesn't seem to display the amount of the purchase on the left of the PayPal page. What's more surprising is that the description of the product is displayed correctly!

BTW, NVP API is what I use!

Cœur
  • 37,241
  • 25
  • 195
  • 267
Alex Fu
  • 45
  • 5

1 Answers1

8

Append &useraction=commit to the PayPal redirection URL (https://www.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=EC-XXXXXX) so it's https://www.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=EC-XXXXXX&useraction=commit

The reasoning is that you're supposed to show the final price on your website's RETURNURL before calling DoExpressCheckoutPayment to finalize the transaction. If this is not how your checkout flow operates, you can override this behaviour by specifying useraction=commit to indicate an immediate purchase.

Robert
  • 19,326
  • 3
  • 58
  • 59
  • Thanks for your answer,but I have tried this way,it doesn't work! And my redirection URL is not the same with yours:(https://www.sandbox.paypal.com/cgi-bin/webscr&cmd=_express-checkout&token=) my "token" is null! Does this make any difference? – Alex Fu Nov 30 '11 at 00:56
  • Yes, the redirect URL for sandbox would need to be https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=EC-XXXXX&useraction=commit, where EC-XXXXXX is the token you received in the SetExpressCheckout API response. Note that my answer *does* work, but you're running into another problem which prevents it from working. – Robert Nov 30 '11 at 21:33
  • Thanks,Robert.Your answer does work!! My problem is that the "token" and "useraction" are in the wrong order! Thank you so much! – Alex Fu Dec 01 '11 at 01:06