如何使用authorized.net通过银行帐户付款模式进行定期循环

发布于 2024-08-29 23:09:59 字数 1673 浏览 10 评论 0原文

我正在使用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."

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

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文