有沒有LOCALE
您可以傳遞給REST API的選項,但是,如果您爲交易設置送貨地址,它應該自動更新。您可以使用下面的調用進行測試。
curl -v https://api.sandbox.paypal.com/v1/payments/payment -H 'Content-Type: application/json' -H 'Authorization: Bearer {ACCESS_TOKEN}' \
-d '{
"intent":"sale",
"redirect_urls":{
"return_url":"http://localhost",
"cancel_url":"http://localhost"
},
"payer":{
"payment_method":"paypal"
},
"transactions":[
{
"amount":{
"total":"7.47",
"currency":"USD"
},
"item_list":{
"shipping_address":{
"recipient_name":"Test Test",
"type":"business",
"line1":"187 Alameda Santos",
"city":"Sao Paulo",
"country_code":"BR",
"postal_code":"01119",
"state":"Condominio Edificio Platinum"
}
},
"description":"This is the payment transaction description."
}
]
}'
您的解決方案完美的作品給我!非常感謝!順便說一句我剛剛檢查REST API只支持直接信用卡付款(我想這意味着輸入CC信息付款時,其重定向到PayPal ..)與美國和英國....你會知道這也:)?我發現我的香港信用卡在Sandbox模式下通過,可能只是沙盒模式.. –
這確實很棒,但如果您沒有送貨地址,該怎麼辦?就像數字產品一樣? – t1gor