refund function have a completion handler that has a
PaymentResult object as a parameter. You can get info about the result of the transaction from this object. The completion handler will always be called when the payment flow is closing. Alternatively you can also get a payment result returned to you inside any of the
PaymentResult object has a property called
result which is one of the following
result is useful to know if the payment was successful or not and why it may have been unsuccessful.