A client with an existing ecommerce site was notified by Moneris that the old Hosted Payment Page was retiring and they needed to update to the new Moneris Checkout. My first step was to look for existing solutions. Unfortunately the Zen Cart community hasn't released a new Moneris plugin and the Moneris Zen Cart documentation is non existent.
Thankfully, between the code for the old Zen Cart Moneris Hosted Pay Page plugin and the Moneris Checkout integration guide, I was able to work out a solution.
First I copied the old /includes/modules/payment/monerishpp.php to create the new Moneris Checkout plugin and any associated language files. It was a fast and easy way to set up the new payment plugin for Zen Cart. Going through all the Moneris Checkout documentation told me it was 3 step process.
function process_button()
all the order and customer data is sent to the Moneris Checkout Gateway server as a preload request. The response includes a ticket number which uniquely identifies the instance and must be passed to the next step in the checkout process.myCheckout.startCheckout( ticket # );
and displays the payment fields. Also needs a bunch of callback functions to close the checkout and redirect the user. I was caught up on this for a while because when the callback is successful I originally thought it meant the payment was successful (credit card is good, expiry is good, etc). But a success status in the callback is just success that Moneris received the data. There's still a final step.© 2024 - Amanda Lutz * Web Developer