Hi,
Unfortunately, Moneris Checkout has not been developed on our end, even in the latest version of HikaShop Business.
Your understanding is not far off the mark.
Here is how you need to do it from what I understand of the Moneris Checkout documentation:
- in onAfterOrderConfirm you first need to do a preload request (in PHP with cURL)
- this will give you back a ticket id
- you need to save that ticket id in the order
- you also need to pass that ticket id in $this->vars so that in the Javascript code you'll add in the end file, you'll use that ticket id to display the Moneris Checkout. At that time, you'll also be able to set callbacks in javascript.
- using the payment complete callback, you can redirect the user to the payment notification URL of your plugin which will call onPaymentNotification.
- in onPaymentNotification you need to do a receipt request (in PHP with cURL) to check that the payment has really been completed and then you can change the status of the order to confirmed and redirect again the user to the thank you page.