Вопрос

The usual steps recommended by Paypal in a Paypal checkout flow are:

1) Display Pay with Paypal on Basket page

2) When user presses that button, do a SetExpressCheckout API call to get a token.

3) Redirect to Paypal website and ask user to input username and password just to get an Authorisation on the amount

4) - User pressesContinue button on Paypal Website

  • User is redirected to the ReturnURL (on the seller website, usually Confirm Order page)

5) call GetExpressCheckoutDetails API to get customer details

6) On confirmation page, user presses on Pay button that calls DoExpressCheckout Payment API call

7) Display Thank you page

I want to eliminate step 4 and 5, basically:

1) Display Pay with Paypal on Basket page

2) When user presses that button, display shipment address confirmation page, get customer details and display again Pay with Paypal button.

3) When user presses that button:

  • do SetExpressCheckout API call to get token
  • redirect to Paypal website and ask for username/password
  • do GetExpressCheckoutDetails API call to get PayerID
  • do DoExpressCheckoutPayment API call

4) Display Thank you page.

It seems shorter customer journey to me. Is there something wrong with this setup?

However, not sure how to do this without getting redirected from Paypal back on the website and having to retrieve data from the URL ($_REQUEST).

I have found a reference on an older question about appending "useraction=commit" to the redirect for SetExpressCheckout, however that is impossible to be found in official Paypal documentation.

Anyone else encountered this problem and found a solution?

Это было полезно?

Решение

You can actually omit GetExpressCheckoutDetails entirely if you don't need any user details but you can't shorten the PayPal experience for the user. They still have to log in and confirm payment and be redirected. But you can call DoExpressCheckoutPayment and GetExpressCheckoutDetails in the same step if you want to.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top