Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
433 views
in Technique[技术] by (71.8m points)

php - Magento: easy way to remove "paypal/express/review" step

When ordering using paypal in magento, it takes you to paypal, paypal already displays a confirmation, you confirm, you get redirected to another confirmation page (/paypal/express/review), it is an extra step that is unnecessary for user experience, I would like to remove it and make the order automatically placed when user confirm on paypal page, once leave paypal if order successful the customer should see the success page.

is there any easy solution to this I might have overlooked or at least if you can point me to the right direction to remove that step.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Actually, Express Checkout can handle this no problem, and I would personally recommend sticking with it.

After the SetExpressCheckout request you redirect the user over to PayPal. You can append useraction=commit to this URL in order to trigger the confirmation from PayPal pages.

This causes the "Continue" button on PayPal to switch to a "Pay" button and informs the user that this is their final confirmation...clicking Pay will submit the payment.

You still have to call DoExpressCheckoutPayment on your server to complete the process, but GetExpressCheckoutDetails is optional at this point. When using useraction=commit you'll get the PayerID back as a URL parameter in your ReturnURL so you don't have to call GECD if you don't want/need to.

You can take this all a setup farther and use the callback API (also known as instant update API) to feed shipping and sales tax information to the PayPal review page. This allows you to populate the drop down values on PayPal's review page with your own shipping data based on the user's shipping address selected on the PayPal review page.

The introduction of those features was to do exactly what you specified...eliminate the additional review process.

All of that said, if the Magento module for Express Checkout doesn't provide options for all of this you'll need to extend it and build them in yourself. I'm pretty it does, though.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...