Refunding a payment
To refund a payment, invoke the refund
function, providing the transactionID
that was returned to you when you processed the payment.
You may optionally pass in an amountInCents
to refund, to refund a portion of
the total payment. If the amount is more than the amount still refundable, or the
card used for the payment does not support partial refunds, then an error message
will be shown to the user.
Refund example