问题描述:

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")

相关阅读:
Top