是否可以使用PayPal NVP API检索退款详细信息,例如父交易ID?到目前为止,我知道可以检索一个"已接收"的详细信息。使用" GetTransactionDetails"进行交易但是对于退款,似乎该方法不起作用。
body = {
USER: user_id,
PWD: password,
SIGNATURE: signature,
METHOD: 'GetTransactionDetails',
TRANSACTIONID: refund_id
VERSION: 204
}
response = HTTParty.post('https://api-3t.sandbox.paypal.com/nvp', body: body).
#Parsed response:
{
"ADDRESSOWNER"=>"PayPal", "ADDRESSSTATUS"=>"None",
"TIMESTAMP"=>"2018-03-15T11:04:45Z",
"CORRELATIONID"=>"97e8f9e1e9921", "ACK"=>"Failure",
"VERSION"=>"204", "BUILD"=>"39949200", "L_ERRORCODE0"=>"10004",
"L_SHORTMESSAGE0"=>"Invalid transaction type",
"L_LONGMESSAGE0"=>"You can not get the details for this type of transaction",
"L_SEVERITYCODE0"=>"Error",
"PENDINGREASON"=>"None",
"REASONCODE"=>"None",
"L_TAXABLE0"=>"false"
}
答案 0 :(得分:0)
我已经使用另一个退款ID再次对其进行了测试,我认为上面的示例失败了,因为无法检索到PayPal费用的退款。可以使用GetTransactionDetails检索定期退款。