Polyfill paymentSuccess + paymentFailed (1032861)

Whenever you render an error you are most likely showing it to a user who was trying to make a purchase. This is why in webpay, there was an error message and an error code. The error message is meant only for the user and the code is meant for the developer. Here, I think you should keep the message simple like "The payment could not be finished due to an internal error." It's not quite right to say it's "successful" because the calling app may not get the completion signal.