PayPal Payment - Do a payment in one step

2019-07-23 15:28发布

问题:

I have a form where people can order one single item for a fixed amount of money. Here are the steps:

  • customer fills out the form
  • customer hits submit and proceeds to the review page where he can check his inputs
  • in the review form should be a button to pay with paypal (button with own design and text)
  • customer hits this button, proceeds to paypal, makes his payment
  • after he paid successfully or not he should be redirected to the form on my site where he can see the result of his payment
  • wehter his payment succeeded or not he can see a message generated by the form application out of the PayPal return string

I tried it but the only thing I can do is that after he submits the form he logs into PayPal, hits the "continue" button and is redirected to my site where he can review his order again and needs to hit "Pay" again to get his order processed.

So all I want is that the customer does all the inputs and reviews on my site and after that he hits a "Pay" button in my own style and proceeds to PayPal where he pays the order without getting back to my site until the payment is done. Then he should be redirected to my site and receives the appropriate message.

What kind of PayPal function do I need? Hope this was clear enough. Please let me know if you need further information. Thank you all in advance.

回答1:

Paypal Express Checkout is what you are looking for, it will solve your problem

Follow the sample and guide:

Link to Code Sample

Link to Paypal Doc