Plugin to display view in payment information page

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
7 лет назад
Hey there,

I'm working on a plugin that is similar to the built-in CheckMoneyOrder but with a bit more functionality, but am having trouble in displaying my own View in the Payment Information page during checkout.

My Controller inherits BasePaymentController and has the PaymentInfo() method. As for the Processor, it inherits BasePlugin and IPayment Method. I copy-pasted what was in the Processor of the CheckMoneyOrder with some minor modifications.

Even though my payment method is displayed in the method selection page, the default credit card info capture view is displayed. I've tried View() and View("path") in the PaymentInfo() but to avail.
7 лет назад
Did you copy a payment plugin to start with?
Did you change the PaymentInfo() return?


public ActionResult PaymentInfo()
...
   return View("~/Plugins/Payments.Manual/Views/PaymentManual/PaymentInfo.cshtml", model);
7 лет назад
Yes,

 
[ChildActionOnly]
        public ActionResult PaymentInfo()
        {
            var accounts = new List<AccountModel>();
            return View("~/Plugins/MyPayment/Views/Bank/PaymentInfo.cshtml");
        }


I placed a breakpoint in the PaymentInfo() method and it wasn't hit at all
7 лет назад
Make sure this is correct and put a break point in there ;)

        public void GetPaymentInfoRoute(out string actionName, out string controllerName, out RouteValueDictionary routeValues)
        {
            actionName = "PaymentInfo";
            controllerName = "PaymentManual";
            routeValues = new RouteValueDictionary { { "Namespaces", "Nop.Plugin.Payments.Manual.Controllers" }, { "area", null } };
        }
7 лет назад
What a stupid oversight. Got it working now. Thanks a lot :)
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.