如何解决 ActiveMerchant Authorize.net 网关问题
每当我尝试在 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]
I get a segmentation fault whenever I try to call authorize on the Authorize.net gateway whether I am using test or live credentials. I am using the latest version of the ActiveMerchant gem. Any ideas on resolving this?
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]
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
对我来说,使用 RVM 版本的 ruby 解决此问题的方法是使用 RVM OpenSSL 软件包安装它: http ://rvm.beginrescueend.com/packages/openssl/
特别是,我使用以下命令安装 ruby 1.8.7-p174:
For me, the fix for this with an RVM version of ruby is to install it with the RVM OpenSSL package: http://rvm.beginrescueend.com/packages/openssl/
In particular, I used the following to install ruby 1.8.7-p174: