Display of cost / price in express check Paypal API

I just implemented the Paypal express payment API on one of our sites, which works for what I want, but it does not display information on the Paypal confirmation page (see the figure) about what the user pays for or how much it costs. If I really wanted too, I could present different amounts to what the user pays, and they would not have an idea! (What would be wrong, but it is possible ...).

Anyway, I read this: https://cms.paypal.com/cms_content/GB/en_GB/files/developer/PP_ExpressCheckoutAPIUserGuide.pdf

And I added the parameters as he says, but I have to skip something because it hasn’t changed anything.

Here is a screenshot of what the Paypal screen looks like:

paypal

It would be extremely useful to either show the total amount or break the elements, as in the above PDF file.

+6
source share
1 answer

You must change the redirect URL from

https://www.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=[token returned in the SetEC response] 

to

 https://www.paypal.com/cgi-bin/webscr?cmd=_express-checkout&useraction=commit&token=[token returned in the SetEC response] 

An express order does not show default order data because your site must do this before and after your customers are sent to PayPal.

EDIT

As Joe says below, the difference is in adding "useraction = commit"

This tells PayPal that you expect the buyer to “make a purchase” on the PayPal site, not yours. In this way, they will show the amount to the buyer so that they can see what they are doing.

+16
source

Source: https://habr.com/ru/post/896430/


All Articles