activemerchant auth.net 登录错误
Posted
技术标签:
【中文标题】activemerchant auth.net 登录错误【英文标题】:activemerchant auth.net login error 【发布时间】:2016-01-27 11:39:33 【问题描述】:我无法让我们的 auth.net 帐户在新的临时服务器上工作。
在当前生产服务器和我的本地计算机上可以找到相同的代码和凭据。
activemerchant 配置如下所示:
ActiveMerchant::Billing::Base.mode = :production #(Rails.env.production? ? :production : :test)
ActiveMerchant::Billing::CreditCard.require_verification_value = false
我已经检查了所有我能想到的配置,这些配置会改变暂存、开发和生产,但一无所获!
我已登录以确认我将正确的登录名/密码传递给 activemerchant。
【问题讨论】:
【参考方案1】:这很愚蠢,显然另一个开发人员在复制凭据时以某种方式更改了单个内部字符(从 8 到 6),因此不容易被注意到。
我只是发布这个答案,因为我发现了一个很棒的工具,但在 activemerchant 中没有很好的记录......
将这两行添加到初始化程序中,您将获得正在进行的低级事务的完整日志...
ActiveMerchant::Billing::PaypalGateway.wiredump_device = File.new(File.join([Rails.root, "log", "paypal.log"]), "a")
ActiveMerchant::Billing::PaypalGateway.wiredump_device.sync = true
您可以将 PaypalGateway 替换为 AuthorizeNetCimGateway(或者您使用的任何网关)
【讨论】:
以上是关于activemerchant auth.net 登录错误的主要内容,如果未能解决你的问题,请参考以下文章
使用 Bundler 加载 activemerchant 时出现问题