Magento 多个 Authorize.net 网关

发布于 2024-09-29 08:30:25 字数 153 浏览 4 评论 0原文

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

I have a CAD and USD gateway accounts for processing credit card payments, both from a payment provider with support for the Authorize.net API. I've successfully configured one using Magento's built-in Authorize.net support... but how can I configure a second Authorize.net Gateway for use in my store?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

迎风吟唱 2024-10-06 08:30:25

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

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

You can reuse the existing authorize.net gateway if you assign separate websites to each currency. They don't need to be actually separate websites with their own domain, just to be designated as websites in the System > Manage Stores menu. Then in Configuration change the Configuration Scope drop down box in the top left to select each website in turn, on the Currency Setup section allow just one currency and in Payment Methods section you can have your specific gateway accounts to match.

This way lets you continue to use the same products for all stores and as long as the base currency is unchanged then it will also continue to convert between currencies automatically.

尸血腥色 2024-10-06 08:30:25

这是可以完成的,但基本上需要您复制授权模块并更改所有命名空间。这需要一些摆弄,但首先将 app/code/core/Mage/Paygate 模块复制到 app/code/local/Yourcompany/Paygatecad 等位置,然后继续重命名类(Mage_Paygate_Model_Authorizenet 变为 Yourcompany_Paygatecad_Model_Authorizenet 等)。请注意区分大小写的文件名和类名,我建议您使用所有前导大写字母,后跟小写字母。

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

毕竟,您应该在“系统”>“配置”>“付款方式”中获得一个新的付款方式,您可以使用 CAD 详细信息进行配置,并且这些块应在结账流程中呈现。

正如您可能从我所说的内容中了解到的那样,为了避免冲突,需要进行一些更改,并且您需要真正对此进行测试。但它应该有效。我不知道有任何替代方法可以实现此目的...当我想要另一种付款方式的两组不同选项并且它有效时,我成功地完成了此操作,但那是针对社区扩展,而不是 Magento 核心,并不是说从哪里复制它真的很重要。

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

理想情况下,您应该做的是仅复制和修改 etcsql 文件。这样一来
原始的 Mage_Paygate 模型和控制器仍将被使用(为您提供升级/补丁的最佳保护),您只需更新配置值以指向 CAD 实例。我无法确认这是否有效,但如果可能的话我会尝试。

哈特哈,
京东

This can be done, but basically requires you to duplicate the Authorize module and change all the namespaces. This will take some fiddling, but start by copying the app/code/core/Mage/Paygate module to somewhere like app/code/local/Yourcompany/Paygatecad and proceed to rename the classes (Mage_Paygate_Model_Authorizenet becomes Yourcompany_Paygatecad_Model_Authorizenet, etc). Be careful of case-sensitive file and class names, I suggest you use all leading capital followed by lowercase.

Create a Yourcompany_Paygatecad.xml module declaration in app/etc/modules, and duplicate the layout and template files in adminhtml and frontend to use your new module name. You'll also need to edit the system.xml and config.xml so that the config values don't conflict in namespace. grep is your friend.

After all that, you should get a new Payment Method in the System>Config>Payment Methods that you can configure with your CAD details, and the blocks should render in the Checkout flow.

As you've probably gathered from what I've said, there's a fair few changes to be made to avoid conflicts, and you'll need to test this really well. But it should work. I'm not aware of any alternative approach to achieve this... I've done this successfully when I've wanted two different set of options for another payment method and it worked, but that was for a community extension, not Magento core, not that it should really matter where you're copying it from.

--------EDIT-----

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文