I am trying to create a new payment way for DeltaPay Gateway following these steps:
1) Create a new Class Library project Named "Nop.Payment.DeltaPay"
2) Create a new Class named "DeltaPayPaymentProcessor" which implements IPaymentMethod interface (add references to Nop.BusinessLogic, Nop.Common, System.Web)
3) Transform PostProcessPayment()
4) Build and copy/paste the "Nop.Payment.DeltaPay.dll" file to bin directory of the web site
5) Add a record to the Nop.PaymentMethod table
Then, opening the web site from VS:
1) Create ~/Templates/Payment/DeltaPay folder
2) Add Web User Control named "PaymentModule.ascx" which inherited from BaseNopfrontendUserControl and implement IPaymentMethodModule interface
<%@ Control Language="C#" AutoEventWireup="true"
Inherits="NopSolutions.NopCommerce.Web.Templates.Payment.DeltaPay.PaymentModule" Codebehind="PaymentModule.ascx.cs" %>
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td>
<b><%=GetLocaleResourceString("DeltaPayPaymentModule.Message")%></b>
</td>
</tr>
</table>
code file:
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using NopSolutions.NopCommerce.BusinessLogic.Payment;
namespace NopSolutions.NopCommerce.Web.Templates.Payment.DeltaPay
{
public partial class PaymentModule: BaseNopFrontendUserControl, IPaymentMethodModule
{
public bool ValidateForm()
{
return true;
}
public PaymentInfo GetPaymentInfo()
{
PaymentInfo paymentInfo = new PaymentInfo();
paymentInfo.CreditCardType = string.Empty;
paymentInfo.CreditCardName = string.Empty;
paymentInfo.CreditCardNumber = string.Empty;
paymentInfo.CreditCardExpireYear = 0;
paymentInfo.CreditCardExpireMonth = 0;
paymentInfo.CreditCardCvv2 = string.Empty;
return paymentInfo;
}
}
}
Then in the error list appears an error: "The name 'GetLocaleResourceString' does not exist in the current context
If I remove the <%=GetLocaleResourceString("DeltaPayPaymentModule.Message")%>
and run the site making an order and at checkoutpaymentmethod.aspx page clicking "next"
occurs an error:
Could not load type "NopSolutions.NopCommerce.Web.Templates.Payment.DeltaPay.PaymentModule".
If I copy the PaymentModule files from PaypalStandard the application works perfectly!
What am I missing?