Really need help

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
12 years ago
It should be the namespace at the top of the PaysonPaymentController file.
12 years ago
hmm I get the same error anyway.

I add all my code.

namespace Nop.Plugin.Payments.Payson
{
    public partial class RouteProvider : IRouteProvider
    {
        public void RegisterRoutes(RouteCollection routes)
        {
            routes.MapRoute("Plugin.Payments.Payson.Configure",
                 "Plugins/PaysonPayment/Configure",
                 new { controller = "PaysonPayment", action = "Configure" },
                 new[] { "Nop.Plugin.Payments.Payson.Controllers" }
            );

            routes.MapRoute("Plugin.Payments.Payson.PaymentInfo",
                "Plugins/PaysonPayment/PaymentInfo",
                new { controller = "PaysonPayment", action = "PaymentInfo" },
                new[] { "Nop.Plugin.Payments.Payson.Controllers" }
           );
        }

        public int Priority
        {
            get
            {
                return 0;
            }
        }
    }
}

namespace Nop.Plugin.Payments.Payson.Controllers
{
    class PaysonPaymentController : BaseNopPaymentController
    {
.......
[AdminAuthorize]
    [ChildActionOnly]
    public ActionResult Configure()
    {
        var model = new ConfigurationModel();
        model.UseSandbox = _paysonPaymentSettings.UseSandBox;
        model.AgentId = _paysonPaymentSettings.AgentId;
        model.CancelUrl = _paysonPaymentSettings.CancelUrl;
        model.SellerEmail = _paysonPaymentSettings.SellerEmail;
        model.Description = _paysonPaymentSettings.Description;
        model.OkUrl = _paysonPaymentSettings.OkUrl;
        model.Md5 = _paysonPaymentSettings.Md5;
        model.GuaranteeOffered = _paysonPaymentSettings.GuaranteeOffered;

        return View("Nop.Plugin.Payments.Payson.Views.PaymentPaysonStandard.Configure", model);
    }

    [HttpPost]
    [AdminAuthorize]
    [ChildActionOnly]
    public ActionResult Configure(ConfigurationModel model)
    {
        if (!ModelState.IsValid)
            return Configure();

        _paysonPaymentSettings.UseSandBox = model.UseSandbox;
        _paysonPaymentSettings.AgentId = model.AgentId;
        _paysonPaymentSettings.CancelUrl = model.CancelUrl;
        _paysonPaymentSettings.SellerEmail = model.SellerEmail;
        _paysonPaymentSettings.Description = model.Description;
        _paysonPaymentSettings.OkUrl = model.OkUrl;
        _paysonPaymentSettings.Md5 = model.Md5;
        _paysonPaymentSettings.GuaranteeOffered = model.GuaranteeOffered;

        return View("Nop.Plugin.Payments.Payson.Views.PaymentPaysonStandard.Configure", model);
    }

namespace Nop.Plugin.Payments.Payson
{
    public class PaymentProcessor : BasePlugin, IPaymentMethod
    {
.....
public void GetConfigurationRoute(out string actionName, out string controllerName, out RouteValueDictionary routeValues)
        {
            actionName = "Configure";
            controllerName = "PaysonPayment";
            routeValues = new RouteValueDictionary() { { "Namespaces", "Nop.Plugin.Payments.Payson.Controllers" }, { "area", null } };
        }

        public void GetPaymentInfoRoute(out string actionName, out string controllerName, out RouteValueDictionary routeValues)
        {
            actionName = "PaymentInfo";
            controllerName = "PaysonPayment";
            routeValues = new RouteValueDictionary() { { "Namespaces", "Nop.Plugin.Payments.Payson.Controllers" }, { "area", null } };
        }
12 years ago
That all looks right from what I can tell.

If you put a breakpoint in GetConfigurationRoute, does it get hit?
12 years ago
Another thing to check, is your Output path in the project settings set to ..\..\Presentation\Nop.Web\Plugins\PLUGINNAME\
12 years ago
I think I'll give up :(

My output is "..\..\Presentation\Nop.Web\Plugins\Payment.Payson\"

It will not get a hit, debug stops on the row "    @Html.Action(Model.ConfigurationActionName, Model.ConfigurationControllerName, Model.ConfigurationRouteValues);" in ConfigurationMethod.cs.
12 years ago
Uninstall the plugin and reinstall it.  Is your Description.txt correct?
12 years ago
Thank you for all your help :)

My Description looks like this:
Group: Payment methods
FriendlyName: Payson
SystemName: Payments.Payson
Version: 1.0
SupportedVersions: 2.40
Author: Magnus Hallberg
DisplayOrder: 1
FileName: Nop.Plugin.Payments.Payson.dll

I have uninstall it and install it again and I get the same error.
12 years ago
Could you share your plugin project?
12 years ago
I can share it, how do I do? I do not have space so I can upload it
12 years ago
Is it possible to build a payment method without using nop classes?
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.