2

我正在使用rails中的active_merchant插件使用authorized.net的重复设施。有两种付款方式

1] Credit Card
2] Bank Account

我使用信用卡成功完成了

对于重复我需要关闭我的测试模式。此外,我的电子支票、信用卡处理和订阅都已启用。

但我无法使用银行账户订阅

以下是我的代码

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 时收到以下错误

"The test transaction was not successful. (128) This transaction cannot be processed."

我做错了什么吗?我搜索了另一个测试银行帐户数据,但没有找到。

4

0 回答 0