如何解决 ActiveMerchant Authorize.net 网关问题

发布于 2024-10-07 17:42:10 字数 855 浏览 3 评论 0原文

每当我尝试在 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 技术交流群。

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

听风吹 2024-10-14 17:42:10

对我来说,使用 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

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:

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
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文