GestPay Plugin for nop 3.9

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
7 years ago
Hi,

I have tried to start from the plugin here

https://www.nopcommerce.com/p/2421/gestpay-payment-plugin.aspx

and edit in order that would be compatible with nop 3.9.

Can you help me?

First of all in GestPayPaymentProcessor.cs in Properties I have added this code

public string PaymentMethodDescription
        {
            //return description of this payment method to be display on "payment method" checkout step. good practice is to make it localizable
            //for example, for a redirection payment method, description may be like this: "You will be redirected to PayPal site to complete the payment"
            get { return _localizationService.GetResource("Plugins.Payments.GestPay.Fields.PaymentMethodDescription"); }
        }


and in Fields I have added

private readonly ILocalizationService _localizationService;
.

Now is compiled correctly, but in the application I have error.

System.NullReferenceException: Riferimento a un oggetto non impostato su un'istanza di oggetto. in Nop.Plugin.Payments.GestPay.GestPayPaymentProcessor.get_PaymentMethodDescription() in Nop.Web.Factories.CheckoutModelFactory.PreparePaymentMethodModel(IList`1 cart, Int32 filterByCountryId) in Nop.Web.Controllers.CheckoutController.PaymentMethod() in lambda_method(Closure , ControllerBase , Object[] ) in System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters) in System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) in System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) in System.Web.Mvc.Async.AsyncControllerActionInvoker.<BeginInvokeSynchronousActionMethod>b__39(I

Can you help me?

How to edit Views and Other Cs modules.

Thanks for the help.

Andrea
7 years ago
Nop experts can you please help me? And suggestions? I think for you is very simple and the error is due to change in payment in last version
7 years ago
The _localizationService field wasn't initialized. Please add new parameter ILocalizationService localizationService to the constructor and assign _localizationService  = localizationService. I think it should solve the problem.
6 years ago
Hi ilich_x86

Can you elaborate the solution you have written a bit as I am new to nopCommerce and am facing the same problem faced by 'andreacaffy' i.e.

System.NotImplementedException: The method or operation is not implemented. at
Nop.Plugin.Payments.MyPaymentPlugin.MyPaymentPluginPaymentProcessor.get_PaymentMethodDescription()
6 years ago
Hello,

You haven't implemented PaymentMethodDescription property in MyPaymentPluginPaymentProcessor class. Please take how https://github.com/nopSolutions/Authorize.Net-plugin-for-nopcommerce/tree/nopCommerce-3.90/Nop.Plugin.Payments.AuthorizeNet has been implemented.
6 years ago
Hi, did you solve this issue? I have the same problem after trying to update a payment plugin from 3.8 to 3.9.

Class:
public class KlarnaCheckoutProcessor : BasePlugin, IPaymentMethod


I Added line in field region:
private readonly ILocalizationService _localizationService;


Added lines in Ctor:
ILocalizationService localizationService,

and
this._localizationService = localizationService;


Added method in property region:
        public string PaymentMethodDescription
        {
            get { return _localizationService.GetResource("Motillo.Plugin.KlarnaCheckout.PaymentMethodDescription"); }
        }
        
        #endregion


And I added the Resources in Install and Uninstall methods.

Still I get this Server error:

[Exception: Plugin 'Klarna Checkout'. Method get_PaymentMethodDescription in Motillo.Nop.Plugin.KlarnaCheckout.KlarnaCheckoutProcessor from the Motillo.Nop.Plugin.KlarnaCheckout, Version = 1.2.0.0, Culture = neutral, PublicKeyToken = null Does not have an implementation
]
    Nop.Core.Plugins.PluginManager.Initialize () +2899
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.