Hi,
i trying to make a new payment method for nopcommerece. i have lookad around on the
samples and then tried to make it in same structure.
i have int the templates made a dir named Payson as the provider i want to integrate to.
in this dir i have made 3 files.
-PaymentModule.ascx
-PaymentModule.ascx.cs
-PaymentModule.ascx.designer.cs
all these three are copied from the twocheckout. but i have changed the name so it have Payson insted of twocheckout.
i have also success ful made the admin pages so i can save and made changes to the module.
my problem is when i have compiled a dll or even run it in debug it never hit my payment module class.
so in debug and i click in to checkout and click throu the steps the store halt and throw an error in
line 48 in checkoutpaymentmethod.ascx.cs
decimal paymentMethodAdditionalFee = PaymentManager.GetAdditionalHandlingFee(paymentMethod.PaymentMethodId);
and say the paymentmethod additionalfee cannot be null.
this is the class name i have made in the DB'
NopSolutions.NopCommerce.Payment.Methods.Payson.PaysonPaymentProcessor, Nop.Payment.Payson
user template path
~\Templates\Payment\Payson\PaymentModule.ascx
at the moment i have not put in the code for the payment processor because i want to fix this error before.
so below you can find the source of the dll
using System;
using System.Collections.Generic;
using System.Text;
using NopSolutions.NopCommerce.Common;
using NopSolutions.NopCommerce.Common.Utils;
using NopSolutions.NopCommerce.BusinessLogic;
using NopSolutions.NopCommerce.BusinessLogic.Orders;
using NopSolutions.NopCommerce.BusinessLogic.CustomerManagement;
using NopSolutions.NopCommerce.BusinessLogic.Configuration.Settings;
using NopSolutions.NopCommerce.BusinessLogic.Payment;
namespace NopSolutions.NopCommerce.Payment.Methods.Payson
{
public class PaysonPaymentProcessor : IPaymentMethod
{
#region IPaymentMethod Members
bool IPaymentMethod.CanCapture
{
get { throw new NotImplementedException(); }
}
bool IPaymentMethod.CanRefund
{
get { throw new NotImplementedException(); }
}
bool IPaymentMethod.CanVoid
{
get { throw new NotImplementedException(); }
}
void IPaymentMethod.CancelRecurringPayment(Order order, ref CancelPaymentResult cancelPaymentResult)
{
throw new NotImplementedException();
}
void IPaymentMethod.Capture(Order order, ref ProcessPaymentResult processPaymentResult)
{
throw new NotImplementedException();
}
decimal IPaymentMethod.GetAdditionalHandlingFee()
{
return decimal.Zero;
}
PaymentMethodTypeEnum IPaymentMethod.PaymentMethodType
{
get { throw new NotImplementedException(); }
}
string IPaymentMethod.PostProcessPayment(Order order)
{
throw new NotImplementedException();
}
void IPaymentMethod.ProcessPayment(PaymentInfo paymentInfo, Customer customer, Guid orderGuid, ref ProcessPaymentResult processPaymentResult)
{
throw new NotImplementedException();
}
void IPaymentMethod.ProcessRecurringPayment(PaymentInfo paymentInfo, Customer customer, Guid orderGuid, ref ProcessPaymentResult processPaymentResult)
{
throw new NotImplementedException();
}
void IPaymentMethod.Refund(Order order, ref CancelPaymentResult cancelPaymentResult)
{
throw new NotImplementedException();
}
RecurringPaymentTypeEnum IPaymentMethod.SupportRecurringPayments
{
get { throw new NotImplementedException(); }
}
void IPaymentMethod.Void(Order order, ref CancelPaymentResult cancelPaymentResult)
{
throw new NotImplementedException();
}
#endregion
}
}
Hope someone have time to help me i will be very grateful for that.
I have torn my hair for 3 days now.