I have been trying to create the plugin for Paytm payment method. Everything works well and I am able to save the settings in database too. But I got stuck in PostProcessPayment where I have to use the DB saved setting and unfortunately am only getting the new object instead of saved setting. Any help will be helpful . I have already wasted my lot of time on it.
Code Sample: I am injecting the dependency via constructor
public PaytmPaymentProcessor(IHttpContextAccessor httpContextAccessor, IGenericAttributeService genericAttributeService, ISettingService settingService, IServiceProvider serviceProvider,
ILocalizationService localizationService,IOrderTotalCalculationService orderTotalCalculationService, IWebHelper webHelper,PaytmPaymentSettings paytmPaymentSettings)
{
_settingService = settingService;
_serviceProvider = serviceProvider;
_localizationService = localizationService;
_orderTotalCalculationService= orderTotalCalculationService;
_paytmPaymentSettings = paytmPaymentSettings;
_webHelper = webHelper;
_httpContextAccessor = httpContextAccessor;
_genericAttributeService = genericAttributeService;
}
Custom Payment Plugin Setting Not working
Tuesday, November 26, 2024 12:18:51 AM
Hi,
Please take a look at PayPal Payment plugin in our repository. The majority of redirect payment plugins works in that way so you can use this plugin as a base. Source code of PayPal Standard are available here: https://github.com/grandnode/grandnode/tree/develop/Plugins/Grand.Plugin.Payments.PayPalStandard
Please take a look at PayPal Payment plugin in our repository. The majority of redirect payment plugins works in that way so you can use this plugin as a base. Source code of PayPal Standard are available here: https://github.com/grandnode/grandnode/tree/develop/Plugins/Grand.Plugin.Payments.PayPalStandard
Best regards,
Patryk
GrandNode Team
Patryk
GrandNode Team
0