【问题标题】:Can't connect to Authorize.net Test Account with ActiveMerchant无法使用 ActiveMerchant 连接到 Authorize.net 测试帐户
【发布时间】:2011-11-18 19:23:40
【问题描述】:

我在 Authorize.net 上注册了一个测试帐户,因为您无法使用 CIM 服务进行测试交易,除非通过测试帐户。

我正在使用 ActiveMerchant::Billing::AuthorizeNetCimGateway,它适用于我的常规帐户。但是使用我的测试帐户 api 登录信息,我收到以下错误:

"message"=>{"code"=>"E00007", "text"=>"User authentication failed due to invalid authentication values."}

我做错了什么?我已经阅读了活跃的商家来源,发现以下几行表明它可能发送到了错误的 api url:

  self.test_url = 'https://apitest.authorize.net/xml/v1/request.api'
  self.live_url = 'https://api.authorize.net/xml/v1/request.api'

据我所知,没有办法配置使用哪个url,但我找到了这一行:

url = test? ? test_url : live_url

里面好像设置了var,只有方法test?没有在任何地方定义,所以我看不到如何设置它。

我很困惑。任何人都可以通过 AIM 连接到他们的测试帐户吗?

【问题讨论】:

    标签: ruby-on-rails authorize.net activemerchant


    【解决方案1】:

    找到了如何在有人关心或可以使用此信息的情况下进行这项工作:

    https://github.com/moklett/active_merchant/commit/4784e80d05f241b02dd9e7eb5957778cc91eee57#commitcomment-593814

    http://groups.google.com/group/activemerchant/browse_thread/thread/173ee6554498b20a/cc91dbe2fda51dd6

    ActiveMerchant::Billing::Base.gateway_mode = :test #detaults 到:production,并将使用测试服务器

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2010-11-18
      • 1970-01-01
      • 2022-01-22
      • 2019-09-07
      • 2012-01-09
      • 2012-10-30
      • 2013-06-14
      相关资源
      最近更新 更多