我收到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.setup_purchase(200,:return_url => "xyz",:cancel_return_url => "xyz",:description => "Working good")