我正在尝试使用沙箱中的PayPal API执行退款。我收到另一个内部服务错误。我正在尝试运行以下代码:
pays.PAYID = _useDoc.client_doc_ref;
//pays.OPERATION = Request["OPERATION"];
if (!string.IsNullOrEmpty(pays.PAYID))
{
RefundRequest refreq = new RefundRequest()
{
//invoice_number = _useDoc.document,
amount = new Amount()
{
currency = "EUR",
total = pays.AMOUNT
}
};
var payment = Payment.Get(apiContext, pays.PAYID);
var transactionId = payment.transactions[0].related_resources[0].sale.id;
var response = Sale.Refund(apiContext, transactionId, refreq);
我遇到以下错误:
{ “ name”:“ INTERNAL_SERVICE_ERROR”, “ message”:“发生内部服务错误。”, “ information_link”:“ https://developer.paypal.com/docs/api/payments/#errors”, “ debug_id”:“ fc27b41e6b6aa” }
如果有人在这方面帮助我,将不胜感激。