在这样的rails应用程序中,我使用的是激活器
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当我查看乌塞佩的错误代码(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库的初始化程序,我看到登录,但没有引脚
def initialize(options = {})
requires!(options, :login)
@options = options
super
end ...any想到了如何将这个引脚发送到激活剂中
更新
这是我给交易打的电话
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)但还是什么都没有
发布于 2011-10-24 13:44:36
也许您需要将授权针传递到事务中。请将您调用事务的代码粘贴到哪里?
例如,调用此方法:capture(money, authorization, options = {})
编辑:
我认为ActiveMerchant没有实现pin特性。以下是您的选择:
gem 'activemerchant', :git => 'git://github.com/kalinchuk/active_merchant.git'中,它将从我的github帐户中安装一个gem。我给活跃的商人添加了引脚字段。然后你可以打电话给:
::GATEWAY = ActiveMerchant::Billing::UsaEpayGateway.new(
:login => "SOMEKEY",
:pin => "PIN"
)https://stackoverflow.com/questions/7867450
复制相似问题