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