I'm building a payment resource for my client on Wix. I created a way to redirect users to this 3rd party payment service and after the client pays for the product, the API sends a notification via a POST method which contains a code that allows the API user to consult the payment status. I already created a post_notification function on a http-functions.js file.
What I need now is a way to use this notification code to verify the payment status each 2 hours and if the order was paid, I need to include the client's information (given by this GET method) to a list. Any ideas how to do that?
I was thinking in adding these codes to a collection and go through the collections and using a webmodule to check for each code, but I think this would take too much time to run and how would I call this method in a .jsw file?