I'm using the payments API to allow users order things from our site, and I'd like to use the onPaymentUpdate() function to add confirmed orders to a database (collection) and display a custom message once they have paid for the item.
The issues I'm having are 1) that there seems to be no way to test this without actually placing an order and paying, and 2) the onPaymentUpdate() function doesn't seem to be called when I cancel a payment (the documentation says that the status can return as "failed" or "cancelled", which suggests that the event should fire if I cancel a payment). I'm using both a collection and http://webhook.site/ to test if the event is called, and nothing pops up.
How are you supposed to use this function? I've followed the documentation and examples and I can't get it to work :(
I really need to get my site up and running ASAP, so any help would be appreciated.