无法使用 ActiveMerchant 连接到 Authorize.net 测试帐户

发布于 2024-12-04 17:25:55 字数 713 浏览 0 评论 0原文

我在 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,只有方法测试?没有在任何地方定义,所以我看不到如何设置它。

我很困惑。有人能够通过 AIM 连接到他们的测试帐户吗?

I signed up for a test account with Authorize.net because you can't do test transaction with the CIM service except through a test account.

I am using ActiveMerchant::Billing::AuthorizeNetCimGateway, which works fine with my regular account. However using my test account api login info, I get the following error:

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

What am I doing wrong? I've read through the active merchant source and have found the following lines which indicate that maybe it is sending to the wrong api url:

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

As far as I can tell, there is no way to configure which url is used, but I've found this line:

url = test? ? test_url : live_url

which seems to set the var, only the method test? isn't defined anywhere so I can't see how to set it.

I'm confused. Anyone able to connect to their test account via AIM?

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

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

发布评论

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

评论(1

月亮坠入山谷 2024-12-11 17:25:55

找到了如何使这项工作万一有人关心,或者可以使用此信息:

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 为 :product,并将使用测试服务器

Found how to make this work in case anyone cares, or can use this info:

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 to :production, and will use test server

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