我在这样的 Rails 应用程序中使用 activemerchant
ActiveMerchant::Billing::Base.mode = :test
::GATEWAY = ActiveMerchant::Billing::UsaEpayGateway.new(
:login => "SOMEKEY"
)
我不断收到这个错误代码
error_code: \"10117\"\nauth_code: \"000000\"\nstatus: Error\nerror: Transaction authentication required.\n
当我查看usaepay的错误代码 (10117) 时,我注意到我需要输入密码。这个我有,但我不知道如何实现。我在下面尝试了这两个
ActiveMerchant::Billing::Base.mode = :test
::GATEWAY = ActiveMerchant::Billing::UsaEpayGateway.new(
:login => "SOMEKEY",
:password => "MYPIN"
)
ActiveMerchant::Billing::Base.mode = :test
::GATEWAY = ActiveMerchant::Billing::UsaEpayGateway.new(
:login => "SOMEKEY",
:pin => "MYPIN"
)
我仍然得到同样的错误查看 USAEPAY 库的初始化程序,我看到登录但没有 pin
def initialize(options = {})
requires!(options, :login)
@options = options
super
end
...任何想法我可以如何将此图钉发送到Activemerchant
更新
这是我的交易电话
options = {
:card_code=>self.card_verification
:billing_address=>{
:address1=>self.billing_address,
:city=>self.city,
:state=>self.state,
:zip=>self.zip,
:country=>"US"
}
}
response = GATEWAY.purchase(price_in_cents, credit_card, options)
我试着这样做
options = {
:card_code=>self.card_verification,
:pin=>"333333",
:billing_address=>{
:address1=>self.billing_address,
:city=>self.city,
:state=>self.state,
:zip=>self.zip,
:country=>"US"
}
}
response = GATEWAY.purchase(price_in_cents, credit_card, options)
但仍然没有