我在我的网站上使用PayPal REST API进行退款选项。 我用Paypal测试帐户订购所有taht工作很好,但当我尝试退款我得到“交易被拒绝”。我尝试退还全额,部分金额,货币变化......没有什么帮助我。我也尝试新订单和一些旧订单(2天)相同。 我在这里跑步和得到什么
curl -v https://api.sandbox.paypal.com/v1/payments/sale/*******/refund -H 'Content-Type:application/json' -H 'Authorization: Bearer ***********' -d '{"amount":{"total":"5.00","currency":"JPY"}}'
* About to connect() to api.sandbox.paypal.com port 443 (#0)
* Trying 173.0.82.78...
* Connected to api.sandbox.paypal.com (173.0.82.78) port 443 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
* CAfile: /etc/pki/tls/certs/ca-bundle.crt
CApath: none
* NSS: client certificate not found (nickname not specified)
* SSL connection using SSL_RSA_WITH_3DES_EDE_CBC_SHA
* Server certificate:
* subject: CN=api.sandbox.paypal.com,OU=PayPal Production,O="PayPal, Inc.",L=San Jose,ST=California,C=US
* start date: Dec 06 00:00:00 2012 GMT
* expire date: Dec 06 23:59:59 2016 GMT
* common name: api.sandbox.paypal.com
* issuer: CN=VeriSign Class 3 Secure Server CA - G3,OU=Terms of use at https:// www.verisign.com/rpa (c)10,OU=VeriSign Trust Network,O="VeriSign, Inc.",C=US
> POST /v1/payments/sale/**********/refund HTTP/1.1
> User-Agent: curl/7.29.0
> Host: api.sandbox.paypal.com
> Accept: */*
> Content-Type:application/json
> Authorization: Bearer ******************
> Content-Length: 44
>
* upload completely sent off: 44 out of 44 bytes
< HTTP/1.1 400 Bad Request
< Server: Apache-Coyote/1.1
< Date: Sun, 25 Aug 2013 21:35:55 GMT
< Connection: close
< PayPal-Debug-Id: 6ccd19f66d117
< Content-Type: application/json
< Content-Length: 171
< Connection: close
<
* Closing connection 0
{"name":"TRANSACTION_REFUSED","message":"{0}","information_link":"https://developer.paypal.com/webapps/developer/docs/api/#TRANSACTION_REFUSED","debug_id":"6ccd19f66d117"}
那有什么问题呢?我查看有关PayPal给我的链接,他根本没有帮助我。 我需要尽快退款选项。
答案 0 :(得分:1)
原始交易以日元(JPY)运行,但您的PayPal账户中没有日元余额 - 因此,您在JPY中运行的所有交易都处于“无人认领”状态。登录卖家的帐户(https://www.sandbox.paypal.com),然后转到个人资料 - >我的钱。在更多下( PayPal余额旁边),点击货币。然后,在选择新货币下拉列表中,选择日元,然后点击添加货币。您之前进行的交易应该在几分钟内开始汇入帐户,之后您就可以处理退款。