【发布时间】:2015-12-21 16:56:24
【问题描述】:
我已经集成了 Paypal 沙盒,直播
交易显示成功,但我无法在开发者仪表板上看到交易列表。 代码:
@api = PayPal::SDK::AdaptivePayments.new
@pay = @api.build_pay({
:actionType => "PAY",
:cancelUrl => "http://localhost:3000/adaptive_payments/pay",
:currencyCode => "USD",
:feesPayer => "SENDER",
:ipnNotificationUrl => "http://localhost:3000/adaptive_payments/ipn_notify",
:receiverList => {
:receiver => [{
:amount => 1.0,
:email => "xxxxxx@gmail.com" }] },
:returnUrl => "http://localhost:3000/adaptive_payments/pay"
})
@response = @api.pay(@pay)
key = @response.payKey
回复:
Response.body={
"responseEnvelope": {
"timestamp": "2015-09-28T03:48:23.428-07:00",
"ack": "Success",
"correlationId": "xxxxx",
"build": "17820627"
},
"payKey": "xxxx",
"paymentExecStatus": "CREATED"
}
yml 文件:
production:
mode: live
app_id: xxxxx
username: xxxxx
password: xxxxx
signature: xxxxxxxx
client_id: xxxxxxxx
client_secret: xxxxxxxxx
PayKey 已生成,但我需要通过 API 从后端向用户 PayPal 发送信用,而无需重定向到网页 有没有其他方法,可以在不影响网页的情况下立即付款。
【问题讨论】:
标签: ruby ruby-on-rails-4 paypal transactions paypal-adaptive-payments