当前位置: 动力学知识库 > 问答 > 编程问答 >

ruby on rails - Neither PUB key nor PRIV key: nested asn1 erro

问题描述:

I am getting An OpenSSL::PKey::RSAError Neither PUB key nor PRIV key: nested asn1 error while integrating paypal gateway.

Here is my code:

gw=:paypal_express

paypal_options=YAML.load_file(Rails.root.join('config', 'paypal.yml'))[Rails.env]

paypal_options[:pem]=File.read("#{Rails.root}/paypal_cert_pem.txt")

gateway=ActiveMerchant::Billing::Base.gateway(gw).new(paypal_options)

gateway.set‌​up_purchase(200,:return_url => "xyz",:cancel_return_url => "xyz",:description => "Working good")

分享给朋友:
您可能感兴趣的文章:
随机阅读: