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?