Default Wix PayPal Checkout Button and IPN

I basically had to set up our PayPal account to send emails to a service address that copies the email to our sales inbox and to our linux server. The server will parse all incoming emails and if it finds an email from paypal with transaction ID, it will attempt to use PayPal’s /v1/reporting/transactions API to verify that the transaction exists and get the order cart from it (it would return a JSON).

I’m still not very happy with it, as it takes 2+ hours for PayPal to propagate transactions created in GUI to be accessible via the API. Sometimes it can take 8 hours or even more than that.
If Wix had finally implemented post-insert hooks for the store database, you can use those, as rows will only be inserted into that database if transaction was created (and order was paid, presumably). Back when I was working on this problem, post-commit hooks were not available for the store tables.