Active_shipping联邦快递API认证错误 [英] Active_shipping Fedex API Authentication Error
问题描述
我实施我的应用程序插件aсtive_shipping功能。我有测试帐号,从联邦快递,并试图得到一些运费为在github上显示在插件的自述:
I'm implementing aсtive_shipping plugin functionality in my app. I've got test account from fedex and trying to get some shipping rates as shown in plugin's readme at github:
fedex = FedEx.new(:login => '***', :password => '***', :key => '***',
:account => '510087569', :meter => '100054531')
response = fedex.find_rates(origin, destination, packages)
此请求导致的错误: ActiveMerchant ::航运:: ResponseError(错误 - 1000:验证失败)
此外,我很困惑与所有的API密钥(DHL,UPS等)。我可以在不同的应用程序相同的帐户密钥对每个载波或者我应该让新的为每一个应用程序?
Also I'm confused with all that APIs keys (DHL, UPS etc). Can I use same account keys in different apps for each of carriers or should I make new ones for every app?
推荐答案
您应该通过:测试=>真正
与您的其他选项,让它知道使用测试网址,而非生产的网址。
You should pass :test => true
in with your other options to let it know to use the test URL rather than the production URL.
您可以在这里看到所有的选项和细节
You can see all the options and details here
<一个href=\"https://github.com/Shopify/active_shipping/blob/master/lib/active_shipping/shipping/carriers/fedex.rb\">https://github.com/Shopify/active_shipping/blob/master/lib/active_shipping/shipping/carriers/fedex.rb
在特定的,请确保您的其他选择是这些:
In particular, make sure your other options are these:
# :key is your developer API key
# :password is your API password
# :account is your FedEx account number
# :login is your meter number
这篇关于Active_shipping联邦快递API认证错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!