Magento:删除“paypal/express/review”的简单方法步
在magento中使用paypal订购时,它会带你到paypal,paypal已经显示确认信息,你确认后,你会被重定向到另一个确认页面(/paypal/express/review),这是一个额外的步骤,对于用户体验来说是不必要的,我想删除它并让用户在 paypal 页面上确认时自动下订单,一旦离开 paypal 如果订单成功,客户应该看到成功页面。
有没有我可能忽略的简单解决方案,或者至少您可以指出我正确的方向来删除该步骤。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(8)
事实上,Express Checkout 可以毫无问题地处理这个问题,我个人建议坚持使用它。
在 SetExpressCheckout 请求之后,您将用户重定向到 PayPal。您可以将 useraction=commit 附加到此 URL,以触发 PayPal 页面的确认。
这会导致 PayPal 上的“继续”按钮切换为“付款”按钮,并通知用户这是最终确认...单击“付款”将提交付款。
您仍然需要在服务器上调用 DoExpressCheckoutPayment 来完成该过程,但 GetExpressCheckoutDetails 此时是可选的。使用 useraction=commit 时,您将获得 PayerID 作为 ReturnURL 中的 URL 参数,因此如果您不想/不需要,则不必调用 GECD。
您可以进一步进行所有设置,并使用回调 API(也称为即时更新 API)将运费和销售税信息提供给 PayPal 审核页面。这允许您根据 PayPal 审核页面上选择的用户送货地址,使用您自己的送货数据填充 PayPal 审核页面上的下拉值。
这些功能的引入是为了准确地执行您指定的操作...消除额外的审核过程。
综上所述,如果 Express Checkout 的 Magento 模块没有提供所有这些选项,您需要扩展它并自己构建它们。不过我确实很漂亮。
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.
实际上这里提到的所有解决方案都需要编辑 Magento 核心。这被称为不良做法,并且不会使您的商店保持更新。
对于干净的解决方案,您需要做什么:
1) 创建您的模块
Avoe/Paypal/etc/config .xml
app/etc/Avoe_Paypal.xml
2) 重写配置,添加用户操作“commit”:
3) 创建观察者进行重定向:
还有一个刚刚发布的小型 Magento 扩展昨天,删除审核步骤:
https://github.com/tim-bezhashvyly/Sandfox_RemovePaypalExpressReviewStep
Actually all the solutions mentioned here required to edit the Magento core. This is known as bad practise and does not keep your shop updateable.
What you need to do for a clean solution:
1) Create your module
Avoe/Paypal/etc/config.xml
app/etc/Avoe_Paypal.xml
2) Rewrite config, add useraction 'commit':
3) Create observer to redirect:
There is also a small Magento extension which was just released yesterday, to remove the review step:
https://github.com/tim-bezhashvyly/Sandfox_RemovePaypalExpressReviewStep
不要使用 Paypal Express;如果您不需要此功能,请使用 Paypal Standard。 Paypal Express 是一种结账方式,而不是付款方式。
现在可以在 1.9 中进行配置。
Don't use Paypal Express; use Paypal Standard if you don't need this feature. Paypal Express is a checkout method and not a payment method.
This is now configurable in 1.9.
因此,(对我来说)完美运作的正确交易是上述内容的总结:
1。转到: \app\code\core\Mage\Paypal\Controller\Express\Abstract.php
并在 returnAction() 中搜索:
您必须将: 更改
为:
2.转到:\app\code\core\Mage\Paypal\Model\Config.php
并将: 更改
为:
通过上面的 2 个更改,我弄清楚如何
跳过 Magento Paypal Express Checkout 中的评论页面。
So the right deal there, that works perfectly (for me ) is a sum up from the above :
1. Go to: \app\code\core\Mage\Paypal\Controller\Express\Abstract.php
and search in returnAction() for:
There you have to change:
to:
2. Go to: \app\code\core\Mage\Paypal\Model\Config.php
and change the:
to:
With the 2 changes above, i figure out how to
Skip Review Page in Magento Paypal Express Checkout.
安德鲁·天使的回答确实没有避免确认页面,它只是将按钮值更改为“支付”而不是“确认”,或类似的内容。
无论如何,正确的方法是
\app\code\core\Mage\Paypal\Model\Config.php,到
getExpressCheckoutEditUrl($token)
方法并更改为
要避免 Paypal Express 中的确认用户页面,您只需更改控制器操作中的一行。
前往 Mage/Paypal/Controller/Express/Abstract.php 并搜索
$this->_redirect('*/*/review')
;在returnAction()
中。在那里,您必须更改为
这种方式,当贝宝返回返回操作时,您可以避免显示整个评论页面,并且付款会自动确认。因此,Paypal 以与 PayPal 标准方法相同的方式再次重定向到成功页面。
Andrew Angel's answer really doesn't avoid the comfirmation page, it just changes button value to "Pay" rather to "Confirm", or something like that.
Anyway the correct way to do that is going to
\app\code\core\Mage\Paypal\Model\Config.php, to
getExpressCheckoutEditUrl($token)
method and changeto
To aviod confirmation user page in Paypal Express you only need to change one line in on controller action.
Go to Mage/Paypal/Controller/Express/Abstract.php and search for
$this->_redirect('*/*/review')
; inreturnAction()
. There you have to changeto
That way when paypal returns to return action you avoid to show entire review page and payment was automatically confirmed. So, Paypal redirects again to success pages the same way like PayPal Standard method.
@Toni 重定向网址部分效果很好,谢谢!然而,将“继续”更改为“提交”并没有改变 PayPal 网站上的按钮。但是,我能够通过执行以下操作来修复它:在 Toni 指示更改继续提交的 getExpressCheckoutEditUrl 函数的正上方,有一个函数 getExpressCheckoutStartUrl。如果您在那里添加 useraction 变量,它将起作用。
原始功能:
新功能:
注意 'useraction' => “commit”被添加到新函数中。这应该有效!
@Toni The redirect url part works excellent, thanks! However changing the 'continue' to 'commit' did not change the buttons on PayPal's website. However, I was able to fix it by doing the following: Right above the getExpressCheckoutEditUrl function where Toni instructed to change the continue to commit, there is the funciton getExpressCheckoutStartUrl. If you add the useraction variable there, it will work.
Original function:
New function:
Notice the 'useraction' => 'commit', was added at the new function. This should work!
少了一步,让我再次总结一下整个过程。
1. 转到:\app\code\core\Mage\Paypal\Controller\Express\Abstract.php
并在 returnAction() 中搜索:
您必须将:更改
为:
2 . 转到:\app\code\core\Mage\Paypal\Model\Config.php 并将:更改
为:
3。 通过上述两项更改,您仍然会被带到评论页面并且必须同意条款并且条件下,为了避免这种情况,请访问:
/app/code/core/Mage/Paypal/Controller/Express/Abstract.php
搜索:
在开头用简单的//注释掉以下几行:
您每次进入评论页面的唯一一次是客户贝宝返回拒绝错误。
THere was one step missing let me summarize the entire process again.
1. Go to: \app\code\core\Mage\Paypal\Controller\Express\Abstract.php
and search in returnAction() for:
There you have to change:
to:
2. Go to: \app\code\core\Mage\Paypal\Model\Config.php and change the:
to:
3. With the above two changes you will still be taken to the review page and have to agree to the terms and conditions, to avoid this go to:
/app/code/core/Mage/Paypal/Controller/Express/Abstract.php
Search for :
Comment out the following lines with a simple // at the beginning :
The only time you will every be take to the review page is if the customers paypal returns a declined error.
Magento 1.9 对此有内置支持,即跳过订单审核步骤选项,但它有一个微妙的警告。该功能不适用于您可以在产品详细信息和购物车页面上显示的“快捷方式”按钮。
我的建议是,禁用快捷按钮并启用跳过订单审核步骤选项。为了获得额外的积分,您可以重新安排 Onepage Checkout 流程,这样客户就不必输入两次帐单信息(一次在 Magento 上,另一次在 PayPal 上)。
更多详情请参阅此博文。
Magento 1.9 has built-in support for this, the Skip Order Review Step option, but it has a subtle caveat. The feature doesn't work with the 'Shortcut' buttons you can display on the product detail and cart pages.
My suggestion, disable the shortcut buttons and enable the Skip Order Review Step option. For extra credit you can rearrange the Onepage Checkout flow so that customers won't have to enter billing information twice (once on Magento and again on PayPal).
More details available in this blog post.