Sample Source Code

dotnetCHARGE.CC Objcc = new dotnetCHARGE.CC();

Objcc.Amount =double.Parse(Page.Request.Params["Amount"]);
Objcc.Number = Request.Params["Number"];
Objcc.OrderID=Page.Request.Params["OrderID"];
Objcc.Month = int.Parse(Request.Params["Month"]);
Objcc.Year = int.Parse(Request.Params["Year"]);
int iResult = Objcc.Charge(Processor.Moneris);

if (iResult == 3)
{
Page.Response.Write("The following message was returned from Credit card Processor:");
Page.Response.Write(Objcc.ErrorMessage);
}
else if (iResult == 2)
{
Page.Response.Write("The following message was returned from dotnetCHARGE:");
Page.Response.Write(Objcc.ErrorMessage);
}
else if (iResult == 1)
{
Page.Response.Write("Result: ");
Page.Response.Write("Authcode= " + Objcc.AuthCode);
Page.Response.Write("Avscode= " + Objcc.AvsCode);
Page.Response.Write("TransactionID= " + Objcc.TransactionID);
};