Moneris payment module integration

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
9 years ago
Is there any documentation available on Moneris payment module Canadian integration v3.30 or higher? I installed the payment plugin no problem and got the ps_store_id and hpp_key required to configure Moneris. At the checkout, user is redirected to Moneris website, but once the payment is processed, the user is not being returned to the store and order is not marked as complete. When user cancels the transaction he/she is also not returned back to the store. Either way the order status changes to pending.

How do I set the store up so the customers are returned to the store after the transaction is completed, or cancelled? What are the Approved URL and Declined URL pages, which folders can I find them in? What has to be done so the order is updated to completed, or cancelled? Are there any code modifications required to achieve this, what folders/pages need to be modified? Any code samples?

How does the store administrator know that an order has been completed? Is there a feature that sends the store owner an email that an order has been submitted, so they need to ship it?

I know that there are other payment options available, but the client is already set up with Moneris and that's what he wants to use. Please help if you can.
9 years ago
there is a callbackhandler (on error and on success)


[ValidateInput(false)]
        public ActionResult SuccessCallbackHandler()
        {
            var processor = _paymentService.LoadPaymentMethodBySystemName("Payments.Moneris") as MonerisPaymentProcessor;
            if (processor == null || !processor.IsPaymentMethodActive(_paymentSettings) || !processor.PluginDescriptor.Installed)
            {
                throw new NopException("Moneris module cannot be loaded");
            }

            if (Request.Params != null && Request.Params.Count > 0)
            {
                if (Request.Params.AllKeys.Contains("transactionKey") &&
                    Request.Params.AllKeys.Contains("rvar_order_id"))
                {
                    var transactionKey = Request.Params["transactionKey"];
                    Dictionary<string, string> values;
                    if (processor.TransactionVerification(transactionKey, out values))
                    {
                        var orderIdValue = Request.Params["rvar_order_id"];
                        int orderId;
                        if (int.TryParse(orderIdValue, out orderId))
                        {
                            var order = _orderService.GetOrderById(orderId);
                            if (order != null && _orderProcessingService.CanMarkOrderAsPaid(order))
                            {
                                if (values.ContainsKey("txn_num"))
                                {
                                    order.AuthorizationTransactionId = values["txn_num"];
                                    _orderService.UpdateOrder(order);
                                }

                                _orderProcessingService.MarkOrderAsPaid(order);
                                return RedirectToRoute("CheckoutCompleted", new { orderId = order.Id });
                            }
                        }
                    }
                }
            }
            return RedirectToAction("Index", "Home", new { area = "" });
        }
9 years ago
Thank you Marc. Where do I put this code, what page does this code go into?
8 years ago
Hi,

I'm having the same problem -- everything is configured properly on the plugin end, and the store sends the customer to the moneris site successfully, but once the payment has been processed, there doesn't seem to be a successful message sent back to nopCommerce showing that the payment has been approved. The status of the order still sits in "pending".

If there was a resolution to this I'd really appreciate the secret :)

There are a few options in the Moneris store admin as to what should happen after a successful transaction - does anyone know which option I should choose?



Thanks,
Travis
7 years ago
Hey Travis, were you ever able to get this figured out? Can't get this working either. Going through the code, the SuccessCallBackHandler is never called anywhere....
7 years ago
Unfortunately not with this plugin.. I had to buck up and pay the $99 for the other Moneris plugin. It works better but unfortunately isn't compatible with Interac Online at the moment.
7 years ago
Ah crap... Thanks for the quick response though, appreciate it!

Murray
7 years ago
Actually working on this, in our situation the callback reaches the controller correctly. The controller function requires that request has the following value in params:

transactionKey
rvar_order_id
txn_num

The problem is because the request does not carry a value named transactionKey in its params.
I am trying to reach support at Moneris for clarifying this, I will post back when I have a solution.
7 years ago
Ahh, makes sense, yes. Keeping my fingers crossed and good luck. Moneris aren't exactly stocked with the brightest sometimes...In that regards this is from another user I reached out to:

·         Otherwise, have you been talking with support at moneris, don’t talk to level 1 or 2 they are of no help and I suspect they can provide wrong information, you need to talk to a level 3 tech, at worst a level 2 but you can have doubt the information.

That was some info from Jean-Marc.
7 years ago
Lol! Never mind, you are one and the same. Sorry :)
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.