I am using recurring facility of authorized.net using active_merchant plugin in rails. there are two payment method for this
1] Credit Card
2] Bank Account
I successfully done it using Credit Card
For Recurring i need my Test Mode off. Also my E-check, credit card processing, and subscriptions are all enabled.
But i am not able to subscribed using Bank Account
Following is my code
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
I 开发者_开发知识库get Follwing ERROR when i debug for response.message
"The test transaction was not successful. (128) This transaction cannot be processed."
Am i doing anything wrong i search for the another Test Bank Account Data but i didn't find it.
精彩评论