New Payment Method

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
13 years ago
//////
1) Create new class for your payment gateway
(implement IPaymentMethod interface)
2) Create new user control that implements
IPaymentMethodModule interface and
place it into \NopCommerceStore\Templates\Payment\[FolderName].
It'll be displayed to customers.
3) Create new user cont
rol that implements
IConfigurePaymentMethodModule interface and
place it into \NopCommerceStore\Administration\Templates\Payment\[FolderName].
It'll be used to configure your payment gateway.
4) Add an appropriate record to
"Nop_PaymentMethod" table. You can do it
via admin panel (Orders/Payments -> Payment Methods).
//////

Hi;

I try to create a new payment method like this que but i cant show the Payment method in the Nop.CommerceStore .ascx pages...I added my project payment module below How can I solve this Problem ???
//  u can download  my project here...
http://www.expressmarket.com.tr/Payment.Est_Module.rar
13 years ago
No one have an idea my problem ?
13 years ago
What do you mean - you build the program and it compiles - Was there an error - did you debug it ?
13 years ago
Did you record to "Nop_Setting" table? There are some extending settings for Payment modules.
13 years ago
Error Pages

Server Error in '/' Application.
Value cannot be null.
Parameter name: type
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentNullException: Value cannot be null.
Parameter name: type

Source Error:

Line 533:            if (paymentMethod == null)
Line 534:                return decimal.Zero;
Line 535:            var iPaymentMethod = Activator.CreateInstance(Type.GetType(paymentMethod.ClassName)) as IPaymentMethod;
Line 536:
Line 537:            decimal result = iPaymentMethod.GetAdditionalHandlingFee();


Source File: C:\Users\veriyaz\Desktop\Mustafa\nopCommerce_1.90_Source\Libraries\Nop.BusinessLogic\Payment\PaymentService.cs    Line: 535

Stack Trace:

[ArgumentNullException: Value cannot be null.
Parameter name: type]
   System.Activator.CreateInstance(Type type, Boolean nonPublic) +9643414
   System.Activator.CreateInstance(Type type) +6
   NopSolutions.NopCommerce.BusinessLogic.Payment.PaymentService.GetAdditionalHandlingFee(Int32 paymentMethodId) in C:\Users\veriyaz\Desktop\Mustafa\nopCommerce_1.90_Source\Libraries\Nop.BusinessLogic\Payment\PaymentService.cs:535
   NopSolutions.NopCommerce.Web.Modules.CheckoutPaymentMethodControl.FormatPaymentMethodInfo(PaymentMethod paymentMethod) in C:\Users\veriyaz\Desktop\Mustafa\nopCommerce_1.90_Source\NopCommerceStore\Modules\CheckoutPaymentMethod.ascx.cs:50
   ASP.modules_checkoutpaymentmethod_ascx.__DataBind__control4(Object sender, EventArgs e) in c:\Users\veriyaz\Desktop\Mustafa\nopCommerce_1.90_Source\NopCommerceStore\Modules\CheckoutPaymentMethod.ascx:20
   System.Web.UI.Control.OnDataBinding(EventArgs e) +91
   System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +92
   System.Web.UI.Control.DataBind() +15
   System.Web.UI.Control.DataBindChildren() +201
   System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +101
   System.Web.UI.Control.DataBind() +15
   System.Web.UI.WebControls.DataList.CreateItem(Int32 itemIndex, ListItemType itemType, Boolean dataBind, Object dataItem) +137
   System.Web.UI.WebControls.DataList.CreateControlHierarchy(Boolean useDataSource) +488
   System.Web.UI.WebControls.BaseDataList.OnDataBinding(EventArgs e) +64
   System.Web.UI.WebControls.BaseDataList.DataBind() +55
   NopSolutions.NopCommerce.Web.Modules.CheckoutPaymentMethodControl.BindData() in C:\Users\veriyaz\Desktop\Mustafa\nopCommerce_1.90_Source\NopCommerceStore\Modules\CheckoutPaymentMethod.ascx.cs:309
   NopSolutions.NopCommerce.Web.CheckoutPaymentMethodPage.Page_Load(Object sender, EventArgs e) in C:\Users\veriyaz\Desktop\Mustafa\nopCommerce_1.90_Source\NopCommerceStore\CheckoutPaymentMethod.aspx.cs:60
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
   System.Web.UI.Control.OnLoad(EventArgs e) +91
   NopSolutions.NopCommerce.Web.BaseNopFrontendPage.OnLoad(EventArgs e) in C:\Users\veriyaz\Desktop\Mustafa\nopCommerce_1.90_Source\NopCommerceStore\Controls\BaseNopFrontendPage.cs:147
   System.Web.UI.Control.LoadRecursive() +74
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2207
13 years ago
I use my own payment method which is i wrote EstPaymentMethod and but unfortunality my  connecttion is false..
13 years ago
Did you add a reference in the NopCommerceStore project to your new payment method assembly? As NopCommerce uses reflection to load a given payment method type it should know where its assembly is located, so if you add a project reference to your payment project it will be copied in the bin folder and later be found and loaded by the reflection API.

Hope this helps!
13 years ago
Thank you 7Spikes for your advice.
I added references before NopCommerceStore project.I added my payment method in the Payment method and i create web user control in the store and trying to integrate with db .
(Also i added new tables in the projects for save all payment transactions)
And I got some errors there :(
13 years ago
Anyone use for europe paymentmethods like Turkey ?
13 years ago
Bülent bey merhaba
Projede başka hangi dosyalarda değişiklik yaptınız paylaşırmısınız.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.