I'm trying to execute a refund with PayPal's API in sandbox. I'm getting another internal service error. I am trying to run the following code : 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); I am getting the following error: {"name":"INTERNAL_SERVICE_ERROR","message":"An internal service error occurred.","information_link":"https://developer.paypal.com/docs/api/payments/#errors","debug_id":"fc27b41e6b6aa"} It will be very appreciated if someone helps me in this regard.
... View more