问题描述
大家好我试图实施我的新付款方式,但仍能正常工作.但是我的要求有点不同.我需要将用户重定向到支付网关页面.这就是我试图实现的方式
Hi GuysI trying to implement my new payment method its working fine. But My requirement is little bit different. I need to redirect user to the payment gateway page. This is how I am trying to implement
当用户单击下订单"时,将调用我的Namespace_Bank_Model_Payment >>授权方法.我的网关说发送初始请求,基于给定网关的详细信息,发送URL&付款编号.在此网址上,用户必须重定向到客户实际付款的地方.在控制器成功与否中,我有两个动作.错误以处理最终响应.
When user clicks on Place Order my Namespace_Bank_Model_Payment >> authorize method gets called. My gateway Says send an initial request, Based on details given gateway send a URL & Payment id. On this Url user must be redirected Where customer actually makes the payment. I have two actions in Controller success & error to handle the final response.
因为,此代码在ajax请求中被调用,所以我无法将用户重定向到另一个网站.有人可以指导我如何实现它吗?
As, this code is getting called in an ajax request, I can't redirect user to another website. Can anybody guide me how to accomplish it?
非常感谢
嘿尼克,这是我的代码,我已经实现了 Mage::getSingleton('checkout/session').
Save everything you need to decide where to redirect to in a session variable, again typically Mage::getSingleton('checkout/session').
Magento对于Paypal标准有一个非常可靠的实现(如果很混乱).您可以在app/code/core/Mage/Paypal/{Model/Standard.php,controllers/StandardController.php}中查看他们的操作方式.
Magento have a pretty solid, if messy, implementation of this for Paypal standard. You can checkout how they do it in app/code/core/Mage/Paypal/{Model/Standard.php,controllers/StandardController.php}.
这篇关于magento将结帐付款重定向到第三方网关的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!