Skip to content

Refund a Payment

James Goodwin edited this page Mar 24, 2017 · 2 revisions

1. Configuring the Judo instance

var receipt = result as PaymentReceiptModel;
var paymentService = new ServiceFactory().GetPaymentService(BuildJudo());
var refundResult = await paymentService.Refund(new RefundModel()
{
    Amount = receipt.Amount,
    ReceiptId = receipt.ReceiptId
});

2. Receive the refund result

if ("Success".Equals(refundResult.Response.Result))
{
    // handle successful refund
}