1

每当我尝试在 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]
4

1 回答 1

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
于 2011-02-09T20:24:38.380 回答