PUB密钥和PRIV密钥都没有:嵌套asn1 erro

时间:2016-04-21 10:57:41

标签: ruby-on-rails paypal payment-gateway

我收到An OpenSSL::PKey::RSAError PUB密钥和PRIV密钥:在集成paypal网关时嵌套asn1错误。 这是我的代码:

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

0 个答案:

没有答案