【发布时间】:2015-08-28 21:32:15
【问题描述】:
我们目前使用他们的 ruby gem 通过 paypal 的 REST API 处理美元付款。我想接受其他货币并已将我们的帐户设置为自动将外币付款转换为美元。我可以成功处理这些付款,并且可以在沙盒 Web 界面中看到它们已被转换,但我不清楚如何通过 API 查找转换交易。任何人都可以对此有所了解吗?请参阅下面的屏幕截图和完成的付款+销售记录。
Response[200]: OK, Duration: 0.858s
{
"id" => "PAY-0XK33729VB648561PKV5SG6A",
"intent" => "sale",
"payer" => {
"payment_method" => "paypal",
"status" => "VERIFIED",
"payer_info" => {
"email" => "jack@example.com",
"first_name" => "Fake",
"last_name" => "Fakerson",
"payer_id" => "F2JC8YDQ6HDUA",
"shipping_address" => {
"line1" => "1 Main St",
"city" => "San Jose",
"state" => "CA",
"postal_code" => "95131",
"country_code" => "US",
"recipient_name" => "Fake Fakerson"
}
}
},
"transactions" => [
[0] {
"amount" => {
"currency" => "EUR",
"total" => "5.00",
"details" => {
"subtotal" => "5.00"
}
},
"description" => "Unlimited School - I'm a course",
"related_resources" => [
[0] {
"sale" => {
"id" => "24439073LW446012K",
"amount" => {
"currency" => "EUR",
"total" => "5.00"
},
"payment_mode" => "INSTANT_TRANSFER",
"state" => "completed",
"protection_eligibility" => "ELIGIBLE",
"protection_eligibility_type" => "ITEM_NOT_RECEIVED_ELIGIBLE,UNAUTHORIZED_PAYMENT_ELIGIBLE",
"transaction_fee" => {
"currency" => "EUR",
"value" => "0.50"
},
"parent_payment" => "PAY-0XK33729VB648561PKV5SG6A",
"create_time" => "2015-06-12T18:22:48Z",
"update_time" => "2015-06-12T18:23:19Z",
"links" => [
[0] {
"href" => "https://api.sandbox.paypal.com/v1/payments/sale/24439073LW446012K",
"rel" => "self",
"method" => "GET"
},
[1] {
"href" => "https://api.sandbox.paypal.com/v1/payments/sale/24439073LW446012K/refund",
"rel" => "refund",
"method" => "POST"
},
[2] {
"href" => "https://api.sandbox.paypal.com/v1/payments/payment/PAY-0XK33729VB648561PKV5SG6A",
"rel" => "parent_payment",
"method" => "GET"
}
]
}
}
]
}
],
"state" => "approved",
"create_time" => "2015-06-12T18:22:48Z",
"update_time" => "2015-06-12T18:23:19Z",
"links" => [
[0] {
"href" => "https://api.sandbox.paypal.com/v1/payments/payment/PAY-0XK33729VB648561PKV5SG6A",
"rel" => "self",
"method" => "GET"
}
]
}
【问题讨论】:
-
这个你完成了吗?我有同样的要求,你能帮忙吗?
标签: paypal paypal-sandbox paypal-rest-sdk