我正在尝试通过 Paypal 对销售进行退款。 我正在使用 Paypal REST API。
这是我的示例代码:
APIContext apiContext = APiConfig();
Sale sale = Sale.Get(apiContext, "0D952456WY462504J");
Amount refundAmount = new Amount();
refundAmount.total = "0.01";
refundAmount.currency = currency;
Refund refund = new Refund();
refund.amount = refundAmount;
var newRefund = sale.Refund(apiContext, refund);
response = new PaypalResponse() {
amount = newRefund.amount,
create_time = Convert.ToDateTime(newRefund.create_time),
update_time = Convert.ToDateTime(newRefund.update_time),
state = newRefund.state,
parent_payment = newRefund.parent_payment,
id = newRefund.id
};
此行出现错误:“var newRefund = sale.Refund(apiContext, refund);” 它说:远程服务器返回错误:(500)内部服务器错误。
有人能回答吗?谢谢!
最佳答案
关于c# - 退款 Paypal Rest API 中的销售使用 C# 捕获了内部服务错误 500,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27814976/