我正在使用 .NET 的 PayPal SOAP SDK 进行退款交易。我尝试使用来自 SetExpressCheckout/DoExpressCheckout 调用的交易 ID 在 SDK 中调用 RefundTransaction 方法(它们运行良好)。PayPal API 返回 10004 错误“交易 ID 无效”。这是我的代码:
PayPalAPIInterfaceServiceService service = new PayPalAPIInterfaceServiceService();
RefundTransactionRequestType refundTransactionRequest = new RefundTransactionRequestType();
refundTransactionRequest.TransactionID = transactionID;
refundTransactionRequest.PayerID = payerID;
refundTransactionRequest.InvoiceID = invoiceNumber;
refundTransactionRequest.RefundType = RefundType.FULL;
refundTransactionRequest.Amount = new BasicAmountType(GetPayPalCurrency(currencyID), amount.ToString("F"));
var request = new RefundTransactionReq() { RefundTransactionRequest = refundTransactionRequest };
RefundTransactionResponseType refundTransactionResponse = service.RefundTransaction(request);
请帮忙。