我遇到ActiveMerchant和Paypal Express的问题,我不知道如何调试。
我的购买方法返回false:
def purchase
response = EXPRESS_GATEWAY.purchase(1000, express_purchase_options)
response.success?
end
def express_purchase_options
{
ip: ip,
token: express_token,
payer_id: express_payer_id
}
end
使用byebug
我可以检查express_purchase_options,实际上它们已被设置。我设置了Paypal沙盒帐户(业务和个人)。
我正在关注this tutorial。