![](/img/trans.png)
[英]The merchant's account is not able to process transactions with activemerchant + Ruby on rails + Paypal
[英]Paypal merchant-sdk-ruby authorization issue on Heroku
我在Rails應用程序中使用2 PayPal SDK付款
[#PayPal::SDK::Merchant::DataTypes::ErrorType:0x007fc0f80c7c70 @ShortMessage="Authentication/Authorization Failed", @LongMessage="You do not have permissions to make this API call", @ErrorCode="10002", @SeverityCode="Error"]
當我在開發機器上測試相同的代碼時,它就像一個魅力。
似乎Heroku正在阻止我們致電Paypal Merchant SDK。
由於代碼在我們的開發環境中運行良好,因此可能是配置問題。 我還檢查了Ruby和Paypal SDK版本在兩個環境中是否相同。
require 'paypal-sdk-merchant'
vets_list = []
vets_list << {
:ReceiverEmail => 'someone@example.com',
:Amount => {
:currencyID => "USD",
:value => 1.6
}
}
@api = PayPal::SDK::Merchant::API.new
@mass_pay = @api.build_mass_pay({
:ReceiverType => "EmailAddress",
:MassPayItem => vets_list
})
@mass_pay_response = @api.mass_pay(@mass_pay)
有人可以找出我在做什么錯嗎?
謝謝!
PayPal REST sdk現在具有付款支持 ,因此使用它可能是您的一種選擇。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.