English 中文(简体)
Magento多重授权.net网关
原标题:Magento Multiple Authorize.net Gateways

我有一个用于处理信用卡支付的CAD和USD网关帐户,这两个帐户都来自支持Authorize.net API的支付提供商。我已经成功地配置了一个使用Magento的内置Authorize.net支持。。。但是我如何配置第二个Authorize.net网关以便在我的商店中使用?

最佳回答

如果为每种货币分配单独的网站,则可以重用现有的authorize.net网关。它们实际上不需要是具有自己域的独立网站,只需在系统中指定为网站>;管理商店菜单。然后在“配置”中,更改左上角的“配置范围”下拉框,依次选择每个网站,在“货币设置”部分只允许使用一种货币,在“支付方式”部分,您可以匹配特定的网关帐户。

通过这种方式,您可以继续在所有商店使用相同的产品,只要基本货币不变,它也将继续在货币之间自动转换。

问题回答

这是可以做到的,但基本上需要复制Authorize模块并更改所有名称空间。这需要一些技巧,但首先要将app/code/core/Mage/Paygate模块复制到类似apps/code/local/Yourcompany/Paygatecad的位置,然后继续重命名类(Mage_Paygate_Model_Authorignet变为Yourcompany _Paygatecad_Model_AAuthorignet等)。请注意区分大小写的文件名和类名,我建议您使用所有前导大写,后跟小写。

app/etc/modules中创建Yourcompany_Paygatecad.xml模块声明,并在adminhtml前端复制布局和模板文件以使用新的模块名称。您还需要编辑system.xmlconfig.xml,这样配置值就不会在命名空间中发生冲突grep是你的朋友。

毕竟,您应该在系统中获得一种新的支付方式>;配置>;可以使用CAD详细信息配置的付款方式,并且块应在“签出”流中呈现。

正如您可能从我所说的内容中了解到的,为了避免冲突,需要进行一些更改,您需要很好地测试这一点。但它应该起作用。我不知道有什么替代方法可以实现这一点。。。我已经成功地做到了这一点,当时我想要另一种支付方式的两套不同的选择,它起到了作用,但这是为了社区扩展,而不是Magento核心,这并不意味着你从哪里复制它真的很重要。

--------编辑-----

Ideally, what you should do is copy and modify only the etc and sql files. That way the original Mage_Paygate Models and controllers will still be used (gives you best protection for upgrades/patches) and you just update the config values to point to the CAD instance. I can t confirm whether this will work, but I would try that if at all possible.

HTH, JD





相关问题
Automatic Sales Tax Tables

A client needs the ability for their shopping cart to automatically retrieve and keep up to date sales tax tables for at least the US, and preferably all countries with which the US has tax treaties. ...

ecommerce stock management with external payment gateway

this question is similar to this one but with a twist (so the answer accepted for the older question is not valid in the following scenario) i have a site for selling tickets (PHP/MYSQL). Suppose i ...

are automated recurring billings really automated?

"roll your own recurring billing in your rails app with a cron job, a date field for when they are paid through, and amount each person is paying" I just saw this entry here in SO and wonder if ...

ECommerce solution in php and ror [closed]

I m a developer but I never used php nor ruby on rails. I would like to create a small e-commerce website. I found out 2 solutions that seems very good, Prestahop and Spree. Which one would you ...

How to link username in site to PayPal information email?

It s not a problem but i don t know how to do this; let s say that I have a sign up form with some fields: username, password, email, as you know the user clicks on the BUY BUTTON and pay s up. Well, ...

Pragmatically adding give-aways/freebies to an online store

Our business currently has an online store and recently we ve been offering free specials to our customers. Right now, we simply display the special and give the buyer a notice stating we will add the ...

热门标签