使用 PayPal NVP 获取退款交易详情

Get refund transaction details with PayPal NVP

是否可以使用 PayPal NVP API 检索退款详细信息,例如父交易 ID?到目前为止,我知道可以使用 "GetTransactionDetails" 检索 "Received" 交易的详细信息,但对于退款,该方法似乎不起作用。

  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"
  } 

我用另一个退款 ID 再次测试了它,我认为上面的示例失败了,因为无法检索 PayPal 费用的退款。可以使用 GetTransactionDetails 检索定期退款。