我在rails中使用active_merchant插件使用authorized.net的重复设施。 这个
有两种付款方式1] Credit Card
2] Bank Account
我使用信用卡成功完成了
对于Recurring,我需要关闭测试模式。 此外,我的电子支票,信用卡处理和订阅都已启用。
但我无法使用银行账户订阅
以下是我的代码
ActiveMerchant::Billing::Base.mode = :developer
#i found follwing test bank account on net
account = ActiveMerchant::Billing::Check.new(:account_holder_type=>"personal",:account_number=>"123123123", :account_type => "savings", :name=>"name", :routing_number=>"244183602")
if account.valid? #this comes true
gateway = ActiveMerchant::Billing::AuthorizeNetGateway.new(:login => 'Mylogin', :password => 'Mypassword')
response = gateway.recurring( amount, nil, {:interval =>{:length=>@length, :unit =>:months},
:duration =>{:start_date=>'2010-04-24', :occurrences=>1},
:billing_address=>{:first_name=>'dinesh', :last_name=>'singh'},
:bank_account=>{:account_holder_type=>"personal",:account_number=>"123123123", :account_type => "savings", :name_of_account=>"name", :routing_number=>"244183602"}
})
if response.success? #this comes false
else
puts response.message ####>> ERROR
render :action=>"account_payment"
end
当我为response.message调试时,我得到Follwing 错误
"The test transaction was not successful. (128) This transaction cannot be processed."
我做错了什么我搜索另一个测试银行帐户数据,但我没找到。