【问题标题】:How to Resolve ActiveMerchant Authorize.net Gateway Issue如何解决 ActiveMerchant Authorize.net 网关问题
【发布时间】:2011-05-25 10:07:37
【问题描述】:

每当我尝试在 Authorize.net 网关上调用授权时,无论我使用的是测试凭据还是实时凭据,都会遇到分段错误。我正在使用最新版本的 ActiveMerchant gem。有解决这个问题的想法吗?

credit_card = ActiveMerchant::Billing::CreditCard.new(:first_name => "First", :last_name => "Last", :number => "4007000000027", :month => "07", :year => "2012", :verification_value => "111", :type => 'visa')
options = { :billing_address => {:name => "First Last", :address1 => "12 Candy Ln", :city => "Sugarville", :state => "IL", :zip => "12345", :country => "USA" }, :description => "00001" }
gateway = ActiveMerchant::Billing::AuthorizeNetGateway.new(:login => 'scraped', :password => 'scraped', :test => true)

/Users/foo/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/net/http.rb:586: [BUG] Segmentation fault
ruby 1.8.7 (2010-08-16 patchlevel 302) [i686-darwin10.4.0]

【问题讨论】:

    标签: ruby-on-rails e-commerce authorize.net activemerchant


    【解决方案1】:

    对我来说,使用 RVM 版本的 ruby​​ 解决此问题的方法是使用 RVM OpenSSL 包安装它:http://rvm.beginrescueend.com/packages/openssl/

    特别是我使用以下安装ruby 1.8.7-p174:

    rvm package install iconv
    rvm package install openssl
    rvm install 1.8.7-p174 --with-openssl-dir=$HOME/.rvm/usr --with-iconv-dir=$rvm_path/usr
    

    【讨论】:

      猜你喜欢
      • 2015-12-11
      • 1970-01-01
      • 2010-11-27
      • 1970-01-01
      • 1970-01-01
      • 2011-02-11
      • 2013-08-05
      • 2011-10-20
      • 1970-01-01
      相关资源
      最近更新 更多