E-Payment Gateway Code Examples


This KB entry includes simple sample code for different gateways using the icharge component.

Below are code examples for different gateways supported in the E-Payment Integrator. At the time of this article not all gateways have sample code published here. If you require sample code for a gateway not listed below please contact support@4dpayments.com.

Gateways

5th Dimension

icharge.Gateway = IchargeGateways.gw5thDimension; //This is the "mkey" icharge.MerchantLogin = "XXXXXXXXXXXXXXXXXXXXXXXX"; icharge.Card.Number = "4111111111111111"; icharge.Card.ExpMonth = 12; icharge.Card.ExpYear = 17; icharge.Card.CVVData = "123"; icharge.Customer.Address = "123 Nowhere Ln"; icharge.Customer.Zip = "90210"; icharge.Customer.Country = "840"; icharge.TransactionAmount = "2.00"; icharge.Sale();

ACH Federal

icharge.Gateway = IchargeGateways.gwACHFederal; //Test URL icharge.GatewayURL = "https://api.achfederal.com/webserviceSandbox/v2/gateway.asmx"; //This is your ten digit NACHA ID icharge.MerchantLogin = "1234567890"; //This is your 16-byte unique identifier token icharge.MerchantPassword = "TOKEN"; icharge.InvoiceNumber = "" + new Random().Next(); icharge.TransactionAmount = "1.08"; icharge.Card.Number = "4200000000000000"; icharge.Card.ExpMonth = 1; icharge.Card.ExpYear = 15; icharge.Card.CVVData = "123"; icharge.Sale();

ACH Payments

icharge.Gateway = IchargeGateways.gwACHPAyments; //Test URL icharge.GatewayURL = "https://www.paymentsgateway.net/cgi-bin/posttest.pl"; //This is your six digit ID code icharge.MerchantLogin = "123456"; //This is your merchant password icharge.MerchantPassword = "PASSWORD"; icharge.InvoiceNumber = "" + new Random().Next(); icharge.TransactionAmount = "1.08"; icharge.Card.Number = "4200000000000000"; icharge.Card.ExpMonth = 1; icharge.Card.ExpYear = 12; icharge.Card.CVVData = "123"; icharge.Customer.FirstName = "Test"; icharge.Customer.LastName = "Customer"; icharge.Customer.FullName = "Test Customer"; icharge.Customer.Address = "2350 Date Palm"; icharge.Customer.City = "Cathedral City"; icharge.Customer.State = "CA"; icharge.Customer.Zip = "92234"; icharge.Customer.Email = "x@y.com"; icharge.Customer.Phone = "555-123-4567"; icharge.Customer.Id = "123456"; icharge.Sale();

Adyen

icharge.Gateway = IchargeGateways.gwAdyen; //Both Webservice User and Password are available from Adyen's online management console //located at: https://ca-live.adyen.com/ or https://ca-test.adyen.com/ //This is the Webservice User. icharge.MerchantLogin = "User"; //This is the password for your Webservice Username icharge.MerchantPassword = "password"; //This must best set to the name of the merchant account icharge.Config("TerminalId=MerchantAccount"); icharge.Card.ExpMonth = 10; icharge.Card.ExpYear = 15; icharge.Card.Number = "4111111111111111"; icharge.Card.CVVData = "999"; icharge.Customer.Address = "1234 Nowhere Ln"; icharge.Customer.City = "Beverly Hills"; icharge.Customer.Country = "US"; icharge.Customer.Email = "nobody@server.com"; icharge.Customer.FirstName = "John"; icharge.Customer.Id = "CUSTOMER1"; icharge.Customer.LastName = "Smith"; icharge.Customer.Phone = "555-555-5555"; icharge.Customer.State = "CA"; icharge.Customer.Zip = "90210"; icharge.TransactionAmount = "100"; icharge.InvoiceNumber = "5554321"; icharge.Sale();

American Payment Solutions

Icharge icharge = new Icharge(); icharge.Gateway = IchargeGateways.gwAmericanPaymentSolutions; icharge.MerchantLogin = "demo"; icharge.MerchantPassword = "password"; // Fill in desired card and customer info. icharge.Card.Number = "4111111111111111"; icharge.Card.ExpMonth = 12; icharge.Card.ExpYear = 21; icharge.Card.CVVData = "123"; icharge.Customer.FirstName = "Testy"; icharge.Customer.LastName = "Tester"; icharge.Customer.Address = "123 Nowhere Ln"; icharge.Customer.Zip = "90210"; icharge.Customer.Country = "US"; // Alternatively, you can use info saved in the customer // vault by setting only the customer vault Id, like this: icharge.Customer.Id = "1234567890"; // Now, do the sale. icharge.TransactionAmount = "100"; icharge.Sale();

The code snippet below shows how to work with customer vault records:

Icharge icharge = new Icharge(); icharge.Gateway = IchargeGateways.gwAmericanPaymentSolutions; icharge.MerchantLogin = "demo"; icharge.MerchantPassword = "password"; // When creating a new customer vault record, start by filling in desired // card and customer info. Then set APSRequestType to 1 and call Sale(). icharge.Card.Number = "4111111111111111"; icharge.Card.ExpMonth = 12; icharge.Card.ExpYear = 21; icharge.Card.CVVData = "123"; icharge.Customer.FirstName = "Testy"; icharge.Customer.LastName = "Tester"; icharge.Customer.Address = "123 Nowhere Ln"; icharge.Customer.Address2 = "Apt 999"; icharge.Customer.City = "Someplace"; icharge.Customer.State = "NC"; icharge.Customer.Zip = "90210"; icharge.Customer.Country = "US"; icharge.Config("APSRequestType=1"); icharge.Sale(); // Print the customer vault Id if it worked. if (icharge.Response.Approved) Console.WriteLine(icharge.Customer.Id); // To query a customer vault record, make sure that the Id is set, set // APSRequestType to 4, and call Sale(). This will populate the ICharge // component with the data from the customer vault record. // (Note that in this case, Customer.Id is already filled since we just // added a new customer vault record.) icharge.Config("APSRequestType=4"); icharge.Sale(); // Note that querying a customer vault record _won't_ return the full // saved card number, just the expiration date. So while Card.Number // won't be populated with the number, you can see the partial number // in a special field called "cc_number". // Before updating a customer vault record, you should always query // first. That way, when you send the update request, the existing // data (that you haven't changed) will be resubmitted. Any data you // don't resubmit will be cleared on the server when you send the // update request! (Except for the saved card info, it remains.) // Since we've already queried, we can go ahead and change a couple // things, then set APSRequestType to 2, and call Sale(). icharge.Customer.Address2 = ""; icharge.City = "Somewhere"; icharge.Config("APSRequestType=2"); icharge.Sale(); // Finally, if you'd like to delete a customer vault record, just // set Customer.Id (again, not necessary here due to how it already // being set), set APSRequestType to 3, and call Sale(). icharge.Config("APSRequestType=3"); icharge.Sale();

Authorize.NET

icharge.Gateway = IchargeGateways.gwAuthorizeNet; //Test URL icharge.GatewayURL = "https://test.authorize.net/gateway/transact.dll"; icharge.TestMode = true; //This corresponds to the x_login field and is your API Login ID icharge.MerchantLogin = "cnpdev1047"; //This correspond to the x_tran_key field and is your Transaction Key value icharge.MerchantPassword = "SsVxS6trU8whvBwz"; icharge.Card.ExpMonth = 2; icharge.Card.ExpYear = 15; icharge.Card.Number = "4444333322221111"; icharge.TransactionAmount = "1.00"; icharge.InvoiceNumber = "1234"; icharge.Sale();

Note: In version previous to version 5 to specify the transaction key you must use the AddSpecialField method to manually add the x_tran_key field. For instance: icharge.AddSpecialField(“x_tran_key”,”SsVxS6trU8whvBwz”);

Authorize.NET AIM XML API

icharge.Gateway = IchargeGateways.gwAuthorizeNetXML; icharge.GatewayURL = "https://apitest.authorize.net/xml/v1/request.api"; //This is your API Login ID icharge.MerchantLogin = "APILoginID"; //This is your Transaction Key icharge.MerchantPassword = "TransactionKey"; icharge.Card.Number = "5424000000000015"; icharge.Card.ExpMonth = 12; icharge.Card.ExpYear = 20; icharge.Card.CVVData = "900"; icharge.TransactionDesc = "Sale Test"; icharge.TransactionAmount = "5.00"; icharge.InvoiceNumber = "12345"; icharge.TransactionId = "56789"; icharge.Customer.FirstName = "John"; icharge.Customer.LastName = "Doe"; icharge.Customer.Address = "1 Main Street"; icharge.Customer.City = "Pecan Springs"; icharge.Customer.State = "TX"; icharge.Customer.Zip = "44628"; icharge.Customer.Country = "USA"; icharge.Sale();

Barclay

icharge.Gateway = IchargeGateways.gwBarclay; //This is the Username for your ePDQ account. icharge.MerchantLogin = "username"; //This is the Password for your ePDQ account icharge.MerchantPassword = "password"; //This gets set to the name of your application (API) user icharge.Config("UserId=api_user"); //Note you must set the CurrencyCode to the type of currency //that is set on your merchant account. By default, "840" is //set, which is USD. Most accounts will be "826" for Pounds Sterling. icharge.Config("CurrencyCode=826"); icharge.Card.ExpMonth = 10; icharge.Card.ExpYear = 15; icharge.Card.Number = "4111111111111111"; icharge.Card.CVVData = "999"; icharge.Customer.Address = "1234 Nowhere Ln"; icharge.Customer.City = "Beverly Hills"; icharge.Customer.Country = "US"; icharge.Customer.Email = "nobody@server.com"; icharge.Customer.FirstName = "John"; icharge.Customer.Id = "CUSTOMER1"; icharge.Customer.LastName = "Smith"; icharge.Customer.Phone = "555-555-5555"; icharge.Customer.State = "CA"; icharge.Customer.Zip = "90210"; icharge.TransactionAmount = "100"; icharge.InvoiceNumber = "5554321"; icharge.Sale();

BASYS

icharge.Gateway = IchargeGateways.gwBASYS; //This is your UserName icharge.MerchantLogin = "UserName"; //This is your Password icharge.MerchantPassword = "Password"; icharge.Card.Number = "4788250000028291"; icharge.Card.ExpMonth = 12; icharge.Card.ExpYear = 18; icharge.Card.CVVData = "111"; icharge.TestMode = true; icharge.Customer.FullName = "John Smith"; icharge.Customer.Address = "123 Main St"; icharge.Customer.Zip = "11111"; icharge.InvoiceNumber = "123456"; icharge.TransactionAmount = "1.00"; icharge.Sale(); Console.WriteLine(icharge.Response.Approved);

Bluefin

icharge.Gateway = IchargeGateways.gwBluefin; icharge.GatewayURL = "https://cert.payconex.net/api/qsapi/3.8"; //This is your Payconex account identification number icharge.MerchantLogin = "222333444555"; //This is your secret key (also called API access key) icharge.MerchantPassword = "aaaa2a2a2a111aa11aaaa111111a1a11"; icharge.Card.Number = "4444333322221111"; icharge.Card.ExpMonth = 12; icharge.Card.ExpYear = 15; icharge.Card.CVVData = "123"; icharge.Customer.Address = "7305"; icharge.Customer.Zip = "68114"; icharge.TransactionAmount = "1.00"; icharge.Sale();

BluePay

icharge.Gateway = IchargeGateways.gwBluePay; //This is the username for your account. icharge.MerchantLogin = "username"; //This is the password for your username icharge.MerchantPassword = "password"; icharge.Card.ExpMonth = 10; icharge.Card.ExpYear = 15; icharge.Card.Number = "4111111111111111"; icharge.Card.CVVData = "999"; icharge.Customer.Address = "1234 Nowhere Ln"; icharge.Customer.City = "Beverly Hills"; icharge.Customer.Country = "US"; icharge.Customer.Email = "nobody@server.com"; icharge.Customer.FirstName = "John"; icharge.Customer.Id = "CUSTOMER1"; icharge.Customer.LastName = "Smith"; icharge.Customer.Phone = "555-555-5555"; icharge.Customer.State = "CA"; icharge.Customer.Zip = "90210"; icharge.TransactionAmount = "2.21"; icharge.InvoiceNumber = "5554321"; icharge.Sale();

BlueSnap

// Note that there are many different valid combinations of request // fields for BlueSnap beyond the basic sale request shown here. Refer // to the BlueSnap documentation to determine which ones you need for // your use-case, and then refer to the appropriate "Gateway Setup and // Required Properties" page in our E-Payment Integrator documentation // to see how to specify them in the component. icharge.Gateway = IchargeGateways.gwBlueSnap; //These are the API credentials for your account icharge.MerchantLogin = "api_username"; icharge.MerchantPassword = "api_password"; icharge.TestMode = true; icharge.Card.ExpMonth = 10; icharge.Card.ExpYear = 15; icharge.Card.Number = "4111111111111111"; icharge.Card.CVVData = "999"; icharge.Customer.Address = "1234 Nowhere Ln"; icharge.Customer.City = "Beverly Hills"; icharge.Customer.Country = "US"; icharge.Customer.Email = "nobody@server.com"; icharge.Customer.FirstName = "John"; icharge.Customer.LastName = "Smith"; icharge.Customer.Phone = "123-456-7890"; icharge.Customer.State = "CA"; icharge.Customer.Zip = "90210"; icharge.TransactionAmount = "2.21"; // BlueSnap requires that you send a letter-based currency code. By // default this is set to USD, but we'll set it explicitly here for // the purpose of the example. icharge.Config("CurrencyCode=USD"); icharge.Sale();

BrainTree

icharge.Gateway = IchargeGateways.gwBrainTree; //This is the username for your merchant account. //It is the same username that is used to access BrainTree Virtual Terminal icharge.MerchantLogin = "username"; //This is the password for your username icharge.MerchantPassword = "password"; icharge.Card.ExpMonth = 10; icharge.Card.ExpYear = 15; icharge.Card.Number = "4111111111111111"; icharge.Card.CVVData = "999"; icharge.Customer.Address = "123 Nowhere Lane."; icharge.Customer.Zip = "77777"; icharge.TransactionAmount = "2.21"; icharge.InvoiceNumber = "5554321"; icharge.Sale();

CardPointe

icharge.Gateway = IchargeGateways.gwCardPointe; // Uses test URL by default icharge.Config("MerchantCode=merchant id"); icharge.MerchantLogin = "testing"; icharge.MerchantPassword = "testing123"; icharge.Card.ExpMonth = 12; icharge.Card.ExpYear = 21; icharge.Card.Number = "4111111111111111"; icharge.TransactionAmount = "10.00"; icharge.Sale();

CyberSource

icharge.Gateway = IchargeGateways.gwCyberSource; //Test URL icharge.GatewayURL = "https://ics2wstest.ic3.com/commerce/1.x/transactionProcessor/"; //This is your username icharge.MerchantLogin = "bofa_demo3660"; //This is your transaction key generated from your merchant account online. //Be sure to generate this for the SOAP API, not the Simple Order API. icharge.MerchantPassword = "KwXnnvdv5kVH3p...uCqCtKyEElkeSycp1FCit7fQ=="; icharge.Customer.FirstName = "John"; icharge.Customer.LastName = "Doe"; icharge.Customer.Email = "nobody@cybersource.com"; icharge.Customer.Phone = "408-556-9100"; icharge.Customer.Address = "1295 Charleston Rd."; icharge.Customer.City = "Mountain View"; icharge.Customer.State = "CA"; icharge.Customer.Zip = "94043-1307"; icharge.Customer.Country = "US"; icharge.Card.Number = "4111111111111111"; icharge.Card.ExpMonth = 12; icharge.Card.ExpYear = 20; icharge.InvoiceNumber = "12"; icharge.TransactionAmount = "4.59"; icharge.Card.CVVData = "123"; icharge.Sale();

DataCash

icharge.Gateway = IchargeGateways.gwDataCash; //Test URL icharge.GatewayURL = "https://mars.transaction.datacash.com/Transaction"; //This is your client icharge.MerchantLogin = "client"; //This is your password icharge.MerchantPassword = "password"; icharge.Card.Number = "1000380000000012"; icharge.Card.ExpMonth = 1; icharge.Card.ExpYear = 2014; icharge.Card.CVVData = "123"; icharge.TransactionAmount = "1.00"; icharge.Sale();

EFSnet

icharge.Gateway = IchargeGateways.gwEFSNet; //Test URL icharge.GatewayURL = "https://testefsnet.concordebiz.com/EFSnet.dll"; //This is your Store ID icharge.MerchantLogin = "storeid"; //This is your Store KEY icharge.MerchantPassword = "A0FE3...C826C4C"; icharge.Card.ExpMonth = 2; icharge.Card.ExpYear = 12; icharge.Card.Number = "4444333322221111"; icharge.Customer.Address = "1234 Nowhere Ln"; icharge.Customer.City = "Beverly Hills"; icharge.Customer.Country = "US"; icharge.Customer.Email = "nobody@server.com"; icharge.Customer.FirstName = "John"; icharge.Customer.Id = "CUSTOMER1"; icharge.Customer.LastName = "Smith"; icharge.Customer.Phone = "555-555-5555"; icharge.Customer.State = "CA"; icharge.Customer.Zip = "90210"; icharge.InvoiceNumber = "1234"; icharge.TransactionAmount = "1.00"; icharge.TransactionDesc = "Test Transaction"; icharge.Sale();

eProcessing

icharge.Gateway = IchargeGateways.gwEprocessing; //This is your eProcessingNetwork account number. //For testing you may use the value 05971 icharge.MerchantLogin = "05971"; //MerchantPassword is not used icharge.MerchantPassword = ""; //In Production you may be required to specify a RestrictKey. //This can be done with the following code: //icharge.AddSpecialField("RestrictKey", "YourRestrictKey" icharge.Card.CVVData = "123"; icharge.Card.ExpMonth = 2; icharge.Card.ExpYear = 11; icharge.Card.Number = "05971"; icharge.Customer.Address = "1234 Nowhere Ln"; icharge.Customer.City = "Beverly Hills"; icharge.Customer.Country = "US"; icharge.Customer.Email = "nobody@server.com"; icharge.Customer.FirstName = "John"; icharge.Customer.Id = "CUSTOMER1"; icharge.Customer.LastName = "Smith"; icharge.Customer.Phone = "555-555-5555"; icharge.Customer.State = "CA"; icharge.Customer.Zip = "90210"; icharge.InvoiceNumber = "1234"; icharge.TransactionAmount = "1.00"; icharge.TransactionDesc = "Test Transaction"; icharge.Sale();

Note: The component communicates with e-processing using the Transparent Database Engine.

eWay

icharge.Gateway = IchargeGateways.gwEway; //Test URL icharge.GatewayURL = "https://www.eway.com.au/gateway/xmltest/TestPage.asp"; //This is your eWay Customer ID icharge.MerchantLogin = "87654321"; //MerchantPassword is not used icharge.MerchantPassword = ""; icharge.Card.ExpMonth = 2; icharge.Card.ExpYear = 12; icharge.Card.Number = "4444333322221111"; icharge.Customer.Address = "1234 Nowhere Ln"; icharge.Customer.City = "Beverly Hills"; icharge.Customer.Country = "US"; icharge.Customer.Email = "nobody@server.com"; icharge.Customer.FirstName = "John"; icharge.Customer.Id = "CUSTOMER1"; icharge.Customer.LastName = "Smith"; icharge.Customer.Phone = "555-555-5555"; icharge.Customer.State = "CA"; icharge.Customer.Zip = "90210"; icharge.InvoiceNumber = "1234"; icharge.TransactionAmount = "100"; icharge.TransactionId = "12345"; icharge.TransactionDesc = "Test Transaction"; icharge.Sale();

ExPay

The ExPay gateway supports 3 transaction types.

  • ExPayGetMethods – retrieves a list of available payment methods
  • AuthOnly – initializes a payment
  • ExPayGetStatus – checks the status of a transaction

ExPayGetMethods:

icharge.Gateway = IchargeGateways.gwExPay; icharge.GatewayURL = "https://api.sandbox.expay.asia/merchant"; //This is your Payee Id Key icharge.MerchantLogin = "1f3fa99a-15e3-4284-b498-d1eb1c3c2222"; //This is your Payee Secret Key icharge.Config("HashSecret=LkCH2RyPCykLnhDsQPLshAqQe6UknMPsPqFhxmjm"); icharge.Config("ExPayGetMethods"); //This makes the request to the server //Navigate the response icharge.Config("XPath=/json/response/methods"); int paymentMethodCount = Convert.ToInt32(icharge.Config("XChildrenCount")); for (int i = 1; i <= paymentMethodCount; i++) { //Navigate to the current method icharge.Config("XPath=/json/response/methods/[" + i + "]"); int currentMethodElementCount = Convert.ToInt32(icharge.Config("XChildrenCount")); //Output the first level element names and values. //This includes the name and id of the payment service such as "PayPal" for (int j = 1; j <= currentMethodElementCount; j++) { icharge.Config("XPath=/json/response/methods/[" + i + "]/[" + j + "]"); string name = icharge.Config("XElement"); string value = icharge.Config("XText"); Console.WriteLine(i + ": " + name + ": " + value); } }

Note that you may also output the raw response value to see the entire JSON response structure like so:

//Output the complete response Console.WriteLine(icharge.Config("RawResponse"));

AuthOnly (initialize payment)

icharge.Gateway = IchargeGateways.gwExPay; icharge.GatewayURL = "https://api.sandbox.expay.asia/merchant"; //This is your Payee Id Key icharge.MerchantLogin = "1f3fa99a-15e3-4284-b498-d1eb1c3c2222"; //This is your Payee Secret Key icharge.Config("HashSecret=LkCH2RyPCykLnhDsQPLshAqQe6UknMPsPqFhxmjm"); //Set the Id of the payment service found from ExPayGetMethods icharge.Config("ExPayServiceID=77"); icharge.TransactionAmount = "1.00"; icharge.TransactionId = "ABCD1234"; icharge.AuthOnly(); //Get the URL to which the customer should be redirected to complete the payment string redirectURL = icharge.GetResponseVar("/response/attributes/[1]/value"); //Save transaction values for use with ExPayGetStatus string ExPayPaymentId = icharge.GetResponseVar("/json/response/id"); string TransactionId = icharge.GetResponseVar("/response/order");

ExPayGetStatus

icharge.Gateway = IchargeGateways.gwExPay; icharge.GatewayURL = "https://api.sandbox.expay.asia/merchant"; //This is your Payee Id Key icharge.MerchantLogin = "1f3fa99a-15e3-4284-b498-d1eb1c3c2222"; //This is your Payee Secret Key icharge.Config("HashSecret=LkCH2RyPCykLnhDsQPLshAqQe6UknMPsPqFhxmjm"); //Set ExPayPaymentId or TransactionId icharge.Config("ExPayPaymentId=719"); //icharge.TransactionId = "ABCD1234"; icharge.Config("ExPayGetStatus"); //This makes the request to the server if(icharge.Response.Code == 205) //Payment was successfully completed

Fast Transact

icharge.Gateway = IchargeGateways.gwFastTransact; //This is your 12 digit merchant or agent account number //For testing you may use 110006559149 icharge.MerchantLogin = "110006559149"; //MerchantPassword is not used icharge.MerchantPassword = ""; icharge.Card.CVVData = "123"; icharge.Card.ExpMonth = 2; icharge.Card.ExpYear = 11; icharge.Card.Number = "5454545454545454"; icharge.Customer.Address = "1234 Nowhere Ln"; icharge.Customer.City = "Beverly Hills"; icharge.Customer.Country = "US"; icharge.Customer.Email = "nobody@server.com"; icharge.Customer.FirstName = "John"; icharge.Customer.Id = "CUSTOMER1"; icharge.Customer.LastName = "Smith"; icharge.Customer.Phone = "555-555-5555"; icharge.Customer.State = "CA"; icharge.Customer.Zip = "90210"; icharge.InvoiceNumber = "1234"; icharge.TransactionAmount = "1.00"; icharge.TransactionDesc = "Test Transaction"; icharge.Sale();

First Atlantic Commerce

icharge.Gateway = IchargeGateways.gwFirstAtlantic; icharge.GatewayURL = "https://ecm.firstatlanticcommerce.com/PGServiceXML";//Test URL //This is your Merchant Id (FACID) icharge.MerchantLogin = "44400111"; //This is your processing password icharge.MerchantPassword = "A5cVe13h"; icharge.Card.CVVData = "123"; icharge.Card.ExpMonth = 2; icharge.Card.ExpYear = 17; icharge.Card.Number = "5454545454545454"; icharge.Customer.Address = "1234 Nowhere Ln"; icharge.Customer.Email = "nobody@server.com"; icharge.Customer.FullName = "John Smith"; icharge.Customer.Zip = "90210"; //InvoiceNumber must be a unique value icharge.InvoiceNumber = "1234"; //TransactionAmount is represented as cents with now decimal point. icharge.TransactionAmount = "100"; icharge.Sale();

Global Iris

icharge.Gateway = IchargeGateways.gwGlobalIris; icharge.MerchantLogin = "username"; //This is the secret key assigned to you icharge.MerchantPassword = "secretkey"; icharge.Card.ExpMonth = 2; icharge.Card.ExpYear = 15; icharge.Card.Number = "4263971921001307"; icharge.Card.CVVIndicator = TCVVIndicators.cvPresent; icharge.Card.CVVData = "234"; icharge.Customer.FirstName = "John"; icharge.Customer.LastName = "Smith"; icharge.InvoiceNumber = "1234"; icharge.TransactionAmount = "200"; icharge.Sale();

GlobalOnePay

Icharge icharge = new Icharge(); icharge.Gateway = IchargeGateways.gwGlobalOnePay; icharge.Config("TerminalId=33001"); // Public test terminal icharge.Config("HashSecret=SandboxSecret001"); icharge.Card.ExpMonth = 12; icharge.Card.ExpYear = 21; icharge.Card.Number = "4444333322221111"; // Visa Test card icharge.Card.CVVData = "214"; icharge.Customer.FirstName = "John"; icharge.Customer.LastName = "Smith"; icharge.InvoiceNumber = new Random().Next(999999).ToString(); icharge.TransactionAmount = "1.23"; icharge.TransactionDesc = "Test"; icharge.Sale();

Global Payroll

Icharge icharge = new Icharge(); icharge.Gateway = IchargeGateways.gwGlobalPayroll; icharge.GatewayURL = "http://demo.gpgway.com/gateway/GPGCCProcess.aspx"; //This is your API Username icharge.MerchantLogin = "demo"; //This is your API Password icharge.MerchantPassword = "password"; //This is your Client ID icharge.AddSpecialField("ClientID", "1009"); icharge.Card.ExpMonth = 10; icharge.Card.ExpYear = 25; icharge.Card.Number = "4222222222222222"; //This will return a CVV Match response icharge.Card.CVVData = "999"; icharge.Customer.FirstName = "John"; icharge.Customer.LastName = "Smith"; //This will return a AVS Match response icharge.Customer.Zip = "90210"; icharge.InvoiceNumber = "123456789"; icharge.TransactionDesc = "Sale Test"; icharge.TransactionAmount = "10.00"; icharge.Sale();

GoToBilling

icharge.Gateway = IchargeGateways.gwGoToBilling; //This is your 6 digit MID icharge.MerchantLogin = "123456"; //This is your 6 digit PIN icharge.MerchantPassword = "123456"; icharge.TestMode = true; icharge.Card.CVVData = "123"; icharge.Card.ExpMonth = 2; icharge.Card.ExpYear = 11; icharge.Card.Number = "5454545454545454"; icharge.Customer.Address = "1234 Nowhere Ln"; icharge.Customer.City = "Beverly Hills"; icharge.Customer.Country = "US"; icharge.Customer.Email = "nobody@server.com"; icharge.Customer.FirstName = "John"; icharge.Customer.Id = "CUSTOMER1"; icharge.Customer.LastName = "Smith"; icharge.Customer.Phone = "555-555-5555"; icharge.Customer.State = "CA"; icharge.Customer.Zip = "90210"; icharge.InvoiceNumber = "1234"; icharge.TransactionAmount = "100"; icharge.TransactionDesc = "Test Transaction"; icharge.Sale();

Heartland

icharge.Gateway = IchargeGateways.gwHeartland; //Test URL icharge.GatewayURL = "https://posgateway.cert.secureexchange.net/Hps.Exchange.PosGateway.UAT/PosGatewayService.asmx"; //This is your Username icharge.MerchantLogin = "Username"; //This is your Password icharge.MerchantPassword = "Password"; //Required. This is issued by Heartland during registration. icharge.Config("HeartlandLicenseId=12345"); //Required. This is issued by Heartland during registration. icharge.Config("HeartlandSiteId=12345"); //Required. This is issued by Heartland during registration. icharge.Config("HeartlandDeviceId=12345678"); icharge.InvoiceNumber = DateTime.Now.ToString("yyyyMMddHHmmss"); icharge.Card.Number = "4012002000060016"; icharge.Card.ExpMonth = 12; icharge.Card.ExpYear = 2025; icharge.Card.CVVData = "123"; icharge.TransactionAmount = "1.00"; icharge.Customer.Address = "6860 Dallas Pkwy"; icharge.Customer.Zip = "750241234"; icharge.Sale();

HSBC

icharge.Gateway = IchargeGateways.gwHSBC; //This is the User ID for your account. icharge.MerchantLogin = "userId"; //This is the Password for your User ID icharge.MerchantPassword = "password"; //This gets set to the Client Id property icharge.Config("TerminalId=ClientID"); //Note you must set the CurrencyCode to the type of currency //that is set on your merchant account. By default, "840" is //set, which is USD. Most accounts will be "826" for Pounds Sterling. icharge.Config("CurrencyCode=826"); icharge.Card.ExpMonth = 10; icharge.Card.ExpYear = 15; icharge.Card.Number = "4111111111111111"; icharge.Card.CVVData = "999"; icharge.Customer.Address = "1234 Nowhere Ln"; icharge.Customer.City = "Beverly Hills"; icharge.Customer.Country = "US"; icharge.Customer.Email = "nobody@server.com"; icharge.Customer.FirstName = "John"; icharge.Customer.Id = "CUSTOMER1"; icharge.Customer.LastName = "Smith"; icharge.Customer.Phone = "555-555-5555"; icharge.Customer.State = "CA"; icharge.Customer.Zip = "90210"; icharge.TransactionAmount = "100"; icharge.InvoiceNumber = "5554321"; icharge.Sale();

Innovative

icharge.Gateway = IchargeGateways.gwInnovative; //This is your username icharge.MerchantLogin = "username"; //This is your password icharge.MerchantPassword = "password"; //This will force Innovative to always return an approval for testing. icharge.AddSpecialField("test_override_errors", "true"); icharge.Card.ExpMonth = 2; icharge.Card.ExpYear = 11; icharge.Card.Number = "4242 4242 4242 4242"; icharge.Customer.Address = "1234 Nowhere Ln"; icharge.Customer.City = "Beverly Hills"; icharge.Customer.Country = "US"; icharge.Customer.Email = "nobody@server.com"; icharge.Customer.FirstName = "John"; icharge.Customer.Id = "CUSTOMER1"; icharge.Customer.LastName = "Smith"; icharge.Customer.Phone = "555-555-5555"; icharge.Customer.State = "CA"; icharge.Customer.Zip = "90210"; icharge.InvoiceNumber = "1234"; icharge.TransactionAmount = "1.00"; icharge.TransactionDesc = "Test Transaction"; icharge.Sale();

iTransact

icharge.Gateway = IchargeGateways.gwITransact; //This is your Vendor ID. //Use the randomly generated UID value or your Gateway ID. icharge.MerchantLogin = "17625"; //MerchantPassword is not used icharge.MerchantPassword = ""; icharge.Card.ExpMonth = 2; icharge.Card.ExpYear = 15; icharge.Card.Number = "5454545454545454"; icharge.Customer.Address = "1234 Nowhere Ln"; icharge.Customer.City = "Beverly Hills"; icharge.Customer.Country = "US"; icharge.Customer.Email = "nobody@server.com"; icharge.Customer.FirstName = "John"; icharge.Customer.Id = "CUSTOMER1"; icharge.Customer.LastName = "Smith"; icharge.Customer.Phone = "555-555-5555"; icharge.Customer.State = "CA"; icharge.Customer.Zip = "90210"; icharge.InvoiceNumber = "1234"; icharge.TransactionAmount = "1.00"; icharge.TransactionDesc = "Test Transaction"; icharge.Sale();

JetPay

icharge.Gateway = IchargeGateways.gwJetPay; //Test URL icharge.GatewayURL = "https://test1.jetpay.com/jetpay"; //TerminalID, assigned by JetPay LLC //TESTMERCHANT is a public test account for JetPay. icharge.MerchantLogin = "TESTMERCHANT"; //TransactionID is required for this gateway. //String, exactly 18 characters long, which contains a unique value." icharge.TransactionID = "MyTestID1234567890"; icharge.Card.ExpMonth = 2; icharge.Card.ExpYear = 15; icharge.Card.Number = "4000300020001000"; icharge.TransactionAmount = "1.00"; icharge.Sale();

KartePay

icharge.Gateway = IchargeGateways.gwKartePay; // MerchantID, assigned by KartePay. icharge.MerchantLogin = "MerchantID"; icharge.TransactionAmount = "1.00"; icharge.Card.Number = "4222222222222"; icharge.Card.ExpMonth = 12; icharge.Card.ExpYear = 2018; icharge.Card.CVVData = "456"; icharge.Customer.FirstName = "John"; icharge.Customer.LastName = "Doe"; icharge.Customer.Address = "123 Main St."; icharge.Customer.City = "Mountain View"; icharge.Customer.State = "CA"; icharge.Customer.Zip = "90210"; icharge.Customer.Country = "US"; icharge.Customer.Id = "1"; icharge.Customer.Email = "JohnDoe@example.com"; icharge.Customer.Phone = "1234567890"; icharge.TransactionId = DateTime.Now.Ticks.ToString(); // These configs MUST be set to real values. icharge.Config("BankName=Wells Fargo"); icharge.Config("PayerIP=127.0.0.1"); icharge.Sale();

Landmark

icharge.Gateway = IchargeGateways.gwLandmark; icharge.MerchantLogin = "Username"; icharge.MerchantPassword = "Password"; //Note: All other test transaction amounts result in a decline icharge.TransactionAmount = "1.00"; icharge.Card.Number = "4222222222222"; icharge.Card.ExpMonth = 2; icharge.Card.ExpYear = 15; icharge.Card.CVVData = "123"; icharge.Customer.FirstName = "John"; icharge.Customer.LastName = "Doe"; icharge.Customer.Address = "123 Main St."; icharge.Customer.City = "Mountain View"; icharge.Customer.State = "CA"; icharge.Customer.Zip = "90210"; icharge.Customer.Id = "65645"; icharge.InvoiceNumber = DateTime.Now.ToString("yyyyMMddHHmmss"); icharge.TransactionId = DateTime.Now.ToString("yyyyMMddHHmmss"); icharge.AddSpecialField ("Company", "swsdemo"); icharge.Sale();

LinkPoint, YourPay, FirstData

icharge.Gateway = IchargeGateways.gwLinkPoint; //Test URL icharge.GatewayURL = "staging.linkpt.net:1129"; //This is your Store Number icharge.MerchantLogin = "1909977744"; //MerchantPassword is not used. Instead a SSL client certificate is used. icharge.SSLCert = new Certificate(CertStoreTypes.cstPEMKeyFile, "..\\..\\files\\linkpoint.pem", "", "*"); icharge.Card.ExpMonth = 2; icharge.Card.ExpYear = 12; icharge.Card.Number = "4111-1111-1111-1111"; icharge.Customer.Address = "1234 Nowhere Ln"; icharge.Customer.City = "Beverly Hills"; icharge.Customer.Country = "US"; icharge.Customer.Email = "nobody@server.com"; icharge.Customer.FirstName = "John"; icharge.Customer.Id = "CUSTOMER1"; icharge.Customer.LastName = "Smith"; icharge.Customer.Phone = "555-555-5555"; icharge.Customer.State = "CA"; icharge.Customer.Zip = "90210"; icharge.TransactionId = DateTime.Now.Ticks.ToString(); icharge.InvoiceNumber = DateTime.Now.Ticks.ToString(); icharge.TransactionAmount = "10.00"; icharge.TransactionDesc = "Test Transaction"; icharge.Sale();

Note: YourPay, LinkPoint and FirstData all use the same implementation.

Litle / Vantiv

icharge.Gateway = IchargeGateways.gwLitle; //Test URL icharge.GatewayURL = "https://cert.litle.com/vap/communicator/online"; //User icharge.MerchantLogin = "user"; //Password icharge.MerchantPassword = "password"; //This is your MerchantId and is required. icharge.Config("MerchantCode=000000"); icharge.Card.Number = "4012002000060016"; icharge.Card.ExpMonth = 12; icharge.Card.ExpYear = 2025; icharge.Card.CVVData = "123"; icharge.Card.CVVData = "123"; icharge.TransactionAmount = "100"; icharge.Customer.Address = "123 Nowhere Ln."; icharge.Customer.Zip = "90210"; icharge.TransactionDesc = "TestTrans"; //Required icharge.InvoiceNumber = DateTime.Now.ToString("yyyyMMddHHmmss"); icharge.Sale();

Mercadotecnia, Ideas y Tecnologia (MIT)

icharge.Gateway = IchargeGateways.gwMIT; //Test URL icharge.GatewayURL = "https://dev.mitec.com.mx"; //This is your user name icharge.MerchantLogin = "User"; //This is the user password icharge.MerchantPassword = "Password"; //Special Fields required for this gateway: //These values will be provided by the gateway icharge.Config("MITCompanyID=XXXX"); icharge.Config("MITBranchID=XX"); icharge.Config("MITCountry=MEX"); icharge.Config("MITTPOperation=XX"); icharge.Config("MerchantCode=XXXXX"); icharge.Config("CurrencyCode=MXN"); icharge.Card.ExpMonth = 2; icharge.Card.ExpYear = 15; icharge.Card.Number = "5454545454545454"; icharge.Card.CVVIndicator = TCVVIndicators.cvPresent; icharge.Card.CVVData = "234"; icharge.Customer.FirstName = "John"; icharge.Customer.LastName = "Smith"; icharge.InvoiceNumber = "1234"; icharge.TransactionAmount = "1.00"; icharge.Sale();

Merchant Anywhere

icharge.Gateway = IchargeGateways.gwMerchantAnywhere; //This is your Merchant Number/ID icharge.MerchantLogin = "10000"; //This is the RegKey field which is your Security Key icharge.MerchantPassword = "Security Key"; icharge.Card.ExpMonth = 2; icharge.Card.ExpYear = 10; icharge.Card.Number = "4012888888881881"; icharge.Customer.Address = "1234 Nowhere Ln"; icharge.Customer.City = "Beverly Hills"; icharge.Customer.Country = "US"; icharge.Customer.Email = "nobody@server.com"; icharge.Customer.FirstName = "John"; icharge.Customer.Id = "CUSTOMER1"; icharge.Customer.LastName = "Smith"; icharge.Customer.Phone = "555-555-5555"; icharge.Customer.State = "CA"; icharge.Customer.Zip = "90210"; icharge.InvoiceNumber = "1234"; icharge.TransactionAmount = "1.00"; icharge.TransactionDesc = "Test Transaction"; icharge.Sale();

Merchant e-Solutions

icharge.Gateway = IchargeGateways.gwMerchantESolutions; //Test URL icharge.GatewayURL = "https://test.merchante-solutions.com/mes-api/tridentApi"; //This is your Profile ID icharge.MerchantLogin = "00000000000000000000"; //This is your Merchant Key icharge.MerchantPassword = "gvQz...qxjf"; icharge.Card.Number = "4444333322221111"; icharge.Card.ExpMonth = 1; icharge.Card.ExpYear = 2012; icharge.Card.CVVData = "123"; icharge.TransactionAmount = "1.00"; icharge.Customer.Zip ="99212"; icharge.Customer.Address = "123 Test st"; icharge.Customer.Id= "1234"; icharge.InvoiceNumber = "12345"; icharge.Sale();

Metrobank

icharge.Gateway = IchargeGateways.gwMetrobank; //This is your Merchant ID icharge.MerchantLogin = "TEST000000000000"; //This is your Access Code icharge.MerchantPassword = "00000000"; //This is your Hash secret icharge.Config("HashSecret=00000000000000000000000000000000"); icharge.Card.Number = "4444333322221111"; icharge.Card.ExpMonth = 1; icharge.Card.ExpYear = 2021; icharge.Card.CVVData = "123"; icharge.TransactionAmount = "100"; icharge.TransactionId = "54321"; icharge.InvoiceNumber = "12345"; icharge.Sale();

Moneris / Moneris USA

icharge.Gateway = IchargeGateways.gwMoneris; //Canadian. //icharge.Gateway = IchargeGateways.gwMonerisUSA; //USA. //Canadian Test URL icharge.GatewayURL = "https://esqa.moneris.com/gateway2/servlet/MpgRequest"; //USA Test URL //icharge.GatewayURL = "https://esplusqa.moneris.com/gateway2/servlet/MpgRequest"; //This is your DirectPost ID / Store ID icharge.MerchantLogin = "aaaaaa002"; //This is your DirectPost Token/Key icharge.MerchantPassword = "dp key"; icharge.Card.ExpMonth = 2; icharge.Card.ExpYear = 15; icharge.Card.Number = "4444333322221111"; icharge.TransactionAmount = "1.00"; icharge.InvoiceNumber = "1234"; icharge.Sale();

Note: In your account online make sure that you have selected the option “Displayed as key/value pairs on our server” under the “DirectPost Response Methods” section in the “DirectPost Config” area.

Monetra

icharge.Gateway = IchargeGateways.gwMonetra; //Test URL icharge.GatewayURL = "https://testbox.monetra.com:8665"; //This is the Username for your Monetra account. icharge.MerchantLogin = "test_ecomm:public"; //This is the Password for your Monetra account. icharge.MerchantPassword = "publ1ct3st"; icharge.Card.Number = "4111111111111111"; icharge.Card.ExpMonth = 10; icharge.Card.ExpYear = 16; //999 is the only acceptable value in the test environment icharge.Card.CVVData = "999"; icharge.InvoiceNumber = "123456"; icharge.TransactionDesc = "Sale Test"; //$6.99 is the only acceptable amount in the test environment icharge.TransactionAmount = "6.99"; icharge.Customer.Address = "5800 NW 39th AVE"; icharge.Customer.Zip = "32606"; //CardHolder's Full Name icharge.Customer.FullName = "John Doe"; icharge.Sale();

Converge / MyVirtualMerchant

icharge.Gateway = IchargeGateways.gwMyVirtualMerchant; //Test URL icharge.GatewayURL = "https://demo.myvirtualmerchant.com/VirtualMerchantDemo/process.do"; //This is your ssl_merchant_id. //Sometimes called Account ID or Virtual Merchant Id icharge.MerchantLogin = "000000"; //This is your ssl_pin icharge.MerchantPassword = "444444"; //This is your ssl_user_id icharge.Config("MyVirtualMerchantUserId=MY_USER"); icharge.AddSpecialField("ssl_test_mode", "true"); //When this field is set to TRUE, transactions will not be forwarded to the //credit card processor, but instead will always return an ?APPROVED? result. icharge.TransactionId = "1234"; icharge.Customer.FirstName = "John"; icharge.Customer.LastName = "Smith"; icharge.Customer.Address = "123 Nowhere Ln"; icharge.Customer.Zip = "90210"; icharge.Customer.City = "Beverly Hills"; icharge.Customer.State = "CA"; icharge.Customer.Country = "USA"; icharge.Customer.Email = "x@y.com"; icharge.InvoiceNumber = "123456"; icharge.Card.Number = "4444333322221111"; icharge.Card.ExpMonth = 1; icharge.Card.ExpYear = 15; icharge.TransactionAmount = "1.00"; icharge.Card.CVVData = "999"; icharge.Sale();

Note: Prior to version 6, to specify the Merchant User ID you must use the AddSpecialField method to manually add the ssl_user_id field. For instance: icharge.AddSpecialField(“ssl_user_id”, “MY_USER”);

Netbanx

//Note: Netbanx is a part of Optimal Payments icharge.Gateway = IchargeGateways.gwNetbanx; //Test URL icharge.GatewayURL = "https://webservices.test.optimalpayments.com/creditcardWS/CreditCardServlet/v1"; //This is your store ID icharge.MerchantLogin = "STORE_ID"; //This is your store password icharge.MerchantPassword = "PASSWORD"; //This is your account number icharge.Config("NetbanxAccountNumber=ACCOUNT_NUM"); icharge.InvoiceNumber = "1234"; icharge.TransactionAmount = "1.08"; icharge.Card.Number = "4444333322221111"; icharge.Card.ExpMonth = 2; icharge.Card.ExpYear = 2015; icharge.Card.CVVData = "123"; icharge.Customer.FirstName = "Test"; icharge.Customer.LastName = "Customer"; icharge.Customer.FullName = "Test Customer"; icharge.Customer.Address = "2350 Date Palm"; icharge.Customer.City = "Cathedral City"; icharge.Customer.State = "CA"; icharge.Customer.Zip = "92234"; icharge.Customer.Email = "x@y.com"; icharge.Customer.Phone = "555-123-4567"; icharge.Sale();

Network Merchants

Icharge icharge = new Icharge(); icharge.Gateway = IchargeGateways.gwNetworkMerchants; icharge.MerchantLogin = "demo"; icharge.MerchantPassword = "password"; icharge.Card.Number = "4111111111111111"; icharge.Card.ExpMonth = 12; icharge.Card.ExpYear = 21; icharge.Card.CVVData = "123"; icharge.Customer.Address = "123 Nowhere Ln"; icharge.Customer.Zip = "90210"; icharge.Customer.Country = "840"; icharge.TransactionAmount = "100"; icharge.Sale();

Orbital

icharge.Gateway = IchargeGateways.gwOrbital; //Test URL icharge.GatewayURL = "https://orbitalvar1.paymentech.net/authorize"; //This is your Merchant ID icharge.MerchantLogin = "000000000000"; //This is your BIN icharge.MerchantPassword = "000002"; //The following values are applicable for some customers //This is your Test ID icharge.Config("OrbitalConnectionUsername=123456"); //This is your Test Password icharge.Config("OrbitalConnectionPassword=ABCDEF"); icharge.Card.ExpMonth = 2; icharge.Card.ExpYear = 15; icharge.Card.Number = "4012888888881"; icharge.Customer.Address = "1234 Nowhere Ln"; icharge.Customer.City = "Beverly Hills"; icharge.Customer.Country = "US"; icharge.Customer.Email = "nobody@server.com"; icharge.Customer.FirstName = "John"; icharge.Customer.Id = "CUSTOMER1"; icharge.Customer.LastName = "Smith"; icharge.Customer.Phone = "555-555-5555"; icharge.Customer.State = "CA"; icharge.Customer.Zip = "90210"; icharge.InvoiceNumber = "1234"; icharge.TransactionAmount = "100"; icharge.TransactionDesc = "Test Transaction"; icharge.Sale();

Note: The default TerminalId value is “001”. This can be changed by setting the TerminalId configuration setting: icharge.Config(“TerminalId=002”);

Payeezy / First Data E4

icharge.Gateway = IchargeGateways.gwFirstDataE4; //This is your Gateway ID (ExactID). This number is of the format Axxxxx-xx icharge.MerchantLogin = "A12345-67"; //This is your Password icharge.MerchantPassword = "password"; //This is your Key ID icharge.Config("FDMSKeyID=12345"); //This is your HMAC Key icharge.Config("HashSecret=ABCdefg0hij1KL2_Mn_oPQRsTuVWxyZ3"); icharge.Card.ExpMonth = 2; icharge.Card.ExpYear = 11; icharge.Card.Number = "5454545454545454"; icharge.Customer.Address = "1234 Nowhere Ln"; icharge.Customer.Email = "nobody@server.com"; icharge.Customer.FirstName = "John"; icharge.Customer.LastName = "Smith"; icharge.Customer.Zip = "90210"; icharge.InvoiceNumber = "1234"; icharge.TransactionAmount = "1.00"quot;; icharge.Sale(); icharge.Gateway = IchargeGateways.gwPayFlowLink; //This is your Login (LOGIN field) icharge.MerchantLogin = "login"; //This is your Password (PWD field) icharge.MerchantPassword = "pwd"; icharge.Card.ExpMonth = 2; icharge.Card.ExpYear = 15; icharge.Card.Number = "4111111111111111"; icharge.Customer.Address = "1234 Nowhere Ln"; icharge.Customer.City = "Beverly Hills"; icharge.Customer.Country = "US"; icharge.Customer.Email = "nobody@server.com"; icharge.Customer.FirstName = "John"; icharge.Customer.Id = "CUSTOMER1"; icharge.Customer.LastName = "Smith"; icharge.Customer.Phone = "555-555-5555"; icharge.Customer.State = "CA"; icharge.Customer.Zip = "90210"; icharge.InvoiceNumber = "1234"; icharge.TransactionAmount = "1.00"; icharge.TransactionDesc = "Test Transaction"; icharge.Sale();

PayFlowPro

icharge.Gateway = IchargeGateways.gwPayFlowPro; //Test URL icharge.GatewayURL = "https://pilot-payflowpro.paypal.com"; //This is your Vendor name icharge.MerchantLogin = "yourLogin"; //This is your Password icharge.MerchantPassword = "password"; //If you have a User defined that is different from your Vendor/Login //icharge.AddSpecialField("USER", "User1"); //This is the Partner field. By default it is PayPal. //icharge.SpecialFields[1].Value = "VeriSign"; icharge.Card.ExpMonth = 2; icharge.Card.ExpYear = 15; icharge.Card.Number = "4222222222222"; icharge.Customer.Address = "1234 Nowhere Ln"; icharge.Customer.City = "Beverly Hills"; icharge.Customer.Country = "US"; icharge.Customer.Email = "nobody@server.com"; icharge.Customer.FirstName = "John"; icharge.Customer.Id = "CUSTOMER1"; icharge.Customer.LastName = "Smith"; icharge.Customer.Phone = "555-555-5555"; icharge.Customer.State = "CA"; icharge.Customer.Zip = "90210"; icharge.InvoiceNumber = "1234"; icharge.TransactionAmount = "1.00"; icharge.TransactionDesc = "Test Transaction"; //unique ID corresponds to REQUEST_ID field icharge.TransactionId = System.DateTime.Now.Ticks.ToString(); icharge.Sale();

PayLeap

icharge.Gateway = IchargeGateways.gwPayLeap; //Test URL icharge.GatewayURL = "http://test.payleap.com/SmartPayments/Transact.asmx/ProcessCreditCard"; //This is your UserName icharge.MerchantLogin = "username"; //This is your Password icharge.MerchantPassword = "password"; icharge.Card.Number = "4444333322221111"; icharge.Card.ExpMonth = 1; icharge.Card.ExpYear = 12; icharge.Card.CVVData = "123"; icharge.Customer.FullName = "John Smith"; icharge.Customer.Zip = "90210"; icharge.Customer.Address = "123 Nowhere Ln."; icharge.TransactionAmount = "1.00"; icharge.InvoiceNumber = "123456"; icharge.Sale();

Payscape

icharge.Gateway = IchargeGateways.gwPayscape; //This is your username. For testing you may use "demo". icharge.MerchantLogin = "demo"; //This is your password. For testing you may use "password". icharge.MerchantPassword = "password"; icharge.Card.Number = "4111111111111111"; icharge.Card.ExpMonth = 12; icharge.Card.ExpYear = 17; icharge.Card.CVVData = "123"; icharge.Customer.Address = "123 Nowhere Ln"; icharge.Customer.Zip = "90210"; icharge.Customer.Country = "840"; icharge.TransactionAmount = "100"; //Amount is specified in cents. icharge.Sale();

PayTrace

icharge.Gateway = IchargeGateways.gwPayTrace; //Test URL icharge.GatewayURL = "https://paytrace.com/api/default.pay"; icharge.TestMode = true; //Username provided by PayTrace icharge.MerchantLogin = "Username"; //Password provided by PayTrace icharge.MerchantPassword = "Password"; icharge.TransactionAmount = "1.00"; icharge.Card.Number = "4000009999999991"; icharge.Card.ExpMonth = 2; icharge.Card.ExpYear = 15; icharge.Card.CVVData = "907"; icharge.Customer.FirstName = "John"; icharge.Customer.LastName = "Smith"; icharge.Customer.Address = "123 Nowhere Ln"; icharge.Customer.Zip = "90210"; icharge.Customer.City = "Beverly Hills"; icharge.Customer.State = "CA"; icharge.Customer.Country = "US"; icharge.Customer.Email = "x@y.com"; icharge.Sale();

Payvision

icharge.Gateway = IchargeGateways.gwPayvision; //Test URL icharge.GatewayURL = "https://testprocessor.payvisionservices.com/GatewayV2/BasicOperationsService.svc"; //Member Id assigned by Payvision icharge.MerchantLogin = "1001234"; //Member GUID assigned by Payvision icharge.MerchantPassword = "AAA6FA6B-9F12-4476-7ABC-B925DD6D4384"; icharge.Card.Number = "4907639999990022"; icharge.Card.ExpMonth = 12; icharge.Card.ExpYear = 16; icharge.Card.CVVData = "111"; icharge.Customer.Address = "8800 Central Dr."; icharge.Customer.Zip = "75251"; icharge.TransactionAmount = "5.00"; icharge.TransactionId = GenerateTransactionId(); icharge.InvoiceNumber = icharge.TransactionId; icharge.Sale(); string ResponseTxnId = icharge.Response.TransactionId; //Transaction GUID is used for Capture, Refund, and Void transactions. Save this from the response. string TxnGUID = icharge.Config("PayvisionTransactionGUID"); //When performing a Void, Capture, or Refund specify PayvisionTransactionGUID icharge.Config("PayvisionTransactionGUID=" + TxnGUID); icharge.VoidTransaction(ResponseTxnId);

PayWiser

Icharge icharge = new Icharge(); icharge.Gateway = IchargeGateways.gwPayWiser; //Test URL icharge.GatewayURL = "https://gateway.paywiser.eu/PaymentGatewayTest/PayWiserPG/"; //This is your API Key icharge.MerchantLogin = "YourAPIKey"; icharge.Card.Number = "4111111111111111"; icharge.Card.ExpMonth = 12; icharge.Card.ExpYear = 2021; icharge.Card.CVVData = "123"; icharge.Customer.FullName = "John Smith"; //This are required fields icharge.AddSpecialField("BuyerIP", "1.1.1.1"); icharge.AddSpecialField("TerminalIP", "2.2.2.2"); icharge.Config("TerminalID=Test Terminal"); icharge.TransactionId = "11111"; icharge.TransactionAmount = "100"; icharge.InvoiceNumber = "Test Invoice"; icharge.TransactionDesc = "Test Description"; //This configuration setting is also required icharge.Config("DynamicDescriptor=Sale Test"); icharge.Sale();

PhoeniXGate

icharge.Gateway = IchargeGateways.gwPhoeniXGate; //This is your UserName icharge.MerchantLogin = "UserName"; //This is your Password icharge.MerchantPassword = "Password"; icharge.Card.Number = "4788250000028291"; icharge.Card.ExpMonth = 12; icharge.Card.ExpYear = 18; icharge.Card.CVVData = "111"; icharge.TestMode = true; icharge.Customer.FullName = "John Smith"; icharge.Customer.Address = "123 Main St"; icharge.Customer.Zip = "11111"; icharge.InvoiceNumber = "123456"; icharge.TransactionAmount = "1.00"; icharge.Sale(); Console.WriteLine(icharge.Response.Approved);

PlanetPayment iPay

icharge.Gateway = IchargeGateways.gwPlanetPayment; //Test URL icharge.GatewayURL = "https://uap.txngw.com"; //This corresponds to the REQUEST KEY value. //It is your assigned processing account number (COMPANY_KEY) icharge.MerchantLogin = "8990"; //This is your 4 digit PIN or Encryption Key icharge.MerchantPassword = "1234"; //This is your TERMINAL_ID icharge.Config("TerminalId=6177"); icharge.TransactionAmount = "1.00"; icharge.Card.Number = "4000009999999991"; icharge.Card.ExpMonth = 2; icharge.Card.ExpYear = 15; icharge.Card.CVVData = "907"; icharge.InvoiceNumber = "cc1"; icharge.Customer.FirstName = "John"; icharge.Customer.LastName = "Smith"; icharge.Customer.Address = "123 Nowhere Ln"; icharge.Customer.Zip = "90210"; icharge.Customer.City = "Beverly Hills"; icharge.Customer.State = "CA"; icharge.Customer.Country = "US"; icharge.Customer.Email = "x@y.com"; icharge.Sale();

PlugNPay

icharge.Gateway = IchargeGateways.gwPlugNPay; //This is your UserName icharge.MerchantLogin = "pnpdemo"; //This is your Password icharge.MerchantPassword = "pnpdemo"; icharge.Card.CVVData = ""; icharge.Card.ExpMonth = 2; icharge.Card.ExpYear = 15; icharge.Card.Number = "4111111111111111"; icharge.Customer.Address = "1234 Nowhere Ln"; icharge.Customer.City = "Beverly Hills"; icharge.Customer.Country = "US"; icharge.Customer.Email = "nobody@server.com"; icharge.Customer.FirstName = "John"; icharge.Customer.Id = "CUSTOMER1"; icharge.Customer.LastName = "Smith"; icharge.Customer.Phone = "555-555-5555"; icharge.Customer.State = "CA"; icharge.Customer.Zip = "90210"; icharge.InvoiceNumber = "1234"; icharge.TransactionAmount = "1.00"; icharge.TransactionDesc = "Test Transaction"; icharge.Sale();

Priority Payment Systems

icharge.Gateway = IchargeGateways.gwPriorityPaymentSystems; // Set TestMode to true to send requests to the sandbox environment. icharge.TestMode = true; // Priority Payment Systems requires a username, password, and merchant Id. icharge.MerchantLogin = "YOUR_USERNAME"; icharge.MerchantPassword = "YOUR_PASSWORD"; icharge.Config("MerchantCode=YOUR_MERCHANT_ID"); // Test card. icharge.Card.Number = "4242424242424242"; icharge.Card.ExpMonth = 10; icharge.Card.ExpYear = 25; icharge.Card.CVVData = "123"; // Customer information. icharge.Customer.FullName = "Fake Person"; icharge.Customer.Address = "123 Nowhere Ln"; icharge.Customer.Address2 = "Apt 999"; icharge.Customer.City = "Chapel Hill"; icharge.Customer.State = "NC"; icharge.Customer.Zip = "77777"; icharge.Customer.Country = "USA"; icharge.Customer.Phone = "1234567890"; // The following properties/special fields can be used to hold whatever data you want. icharge.Customer.Id = "0987654321"; icharge.InvoiceNumber = "TESTTEST"; // 8 character limit. icharge.AddSpecialField("clientReference", "246810"; icharge.AddSpecialField("meta", "This is a test!"); icharge.Sale();

ProPay

icharge.Gateway = IchargeGateways.gwProPay; //Test URL icharge.GatewayURL = "https://xmltest.propay.com/API/PropayAPI.aspx"; //This is the value of your certStr icharge.MerchantLogin = "certStrValue"; //MerchantPassword is not used icharge.MerchantPassword = ""; icharge.TransactionAmount = "100"; //Amount is specified in cents. icharge.Customer.Address = "123 Fake St"; icharge.Customer.Zip = "22222"; icharge.Customer.Email = "tester@test.com"; icharge.Card.Number = "4747474747474747"; icharge.Card.ExpMonth = 2; icharge.Card.ExpYear = 15; icharge.Card.CVVData = "999"; icharge.Customer.FullName = "John Doe"; icharge.InvoiceNumber = "123456"; icharge.Sale();

PSIGate

icharge.Gateway = IchargeGateways.gwPSIGate; //Test URL icharge.GatewayURL = "https://devcheckout.psigate.com/HTMLPost/HTMLMessenger"; //Live URL //icharge.GatewayURL = "https://checkout.psigate.com/HTMLPost/HTMLMessenger"; //This is your Store Key/Merchant ID icharge.MerchantLogin = "merchantcardcapture200024"; icharge.Card.ExpMonth = 2; icharge.Card.ExpYear = 11; icharge.Card.Number = "4111111111111111"; icharge.Customer.Address = "1234 Nowhere Ln"; icharge.Customer.City = "Beverly Hills"; icharge.Customer.Country = "US"; icharge.Customer.Email = "nobody@server.com"; icharge.Customer.FirstName = "John"; icharge.Customer.Id = "CUSTOMER1"; icharge.Customer.LastName = "Smith"; icharge.Customer.Phone = "555-555-5555"; icharge.Customer.State = "CA"; icharge.Customer.Zip = "90210"; icharge.InvoiceNumber = "12346"; icharge.TransactionAmount = "1.00"; icharge.TransactionDesc = "Test Transaction"; icharge.Sale();

PSIGateXML

icharge.Gateway = IchargeGateways.gwPSIGateXML; //Test URL icharge.GatewayURL = "https://realtimestaging.psigate.com/xml"; //This is your Store ID icharge.MerchantLogin = "teststore"; //This is your Passphrase icharge.MerchantPassword = "psigate1234"; icharge.Card.ExpMonth = 2; icharge.Card.ExpYear = 11; icharge.Card.Number = "4111111111111111"; icharge.Customer.Address = "1234 Nowhere Ln"; icharge.Customer.City = "Beverly Hills"; icharge.Customer.Country = "US"; icharge.Customer.Email = "nobody@server.com"; icharge.Customer.FirstName = "John"; icharge.Customer.Id = "CUSTOMER1"; icharge.Customer.LastName = "Smith"; icharge.Customer.Phone = "555-555-5555"; icharge.Customer.State = "CA"; icharge.Customer.Zip = "90210"; icharge.TransactionAmount = "1.00"; icharge.TransactionDesc = "Test Transaction"; icharge.Sale();

QuickBooks Merchant Services (QBMS)

icharge.Gateway = IchargeGateways.gwQBMS; //Test URL icharge.GatewayURL = "https://merchantaccount.ptc.quickbooks.com/j/AppGateway"; //This is your Application Login icharge.MerchantLogin = "app login"; //This is your Connection Ticket icharge.MerchantPassword = "connection ticket"; icharge.TransactionId = "3242343"; icharge.Card.Number = "4111111111111111"; icharge.Card.ExpMonth = 12; icharge.Card.ExpYear = 2025; icharge.TransactionAmount = "10.00"; icharge.Customer.Address = "123 Nowhere Ln."; icharge.Customer.Zip = "90210"; icharge.Card.CVVData = "123"; icharge.TransactionId = DateTime.Now.ToString("yyyyMMddHHmmss"); icharge.Sale();

QuickBooks Payments

icharge.Gateway = IchargeGateways.gwQBPayments; icharge.GatewayURL = "https://sandbox.api.intuit.com"; icharge.MerchantLogin = "OAuth 2.0 Access token"; // Replace with your access token icharge.TransactionAmount = "10.55"; icharge.Card.Number = "4111111111111111"; icharge.Card.CVVData = "123"; icharge.Card.ExpMonth = 2; icharge.Card.ExpYear = 2020; icharge.TransactionId = "1234"; // Should be a unique transation Id icharge.Sale();

Repay

icharge.Gateway = IchargeGateways.gwRepay; //This is your UserName icharge.MerchantLogin = "Username"; //This is your Password icharge.MerchantPassword = "Password"; icharge.Card.Number = "4788250000028291"; icharge.Card.ExpMonth = 12; icharge.Card.ExpYear = 18; icharge.Card.CVVData = "111"; icharge.TestMode = true; icharge.Customer.FullName = "John Smith"; icharge.Customer.Address = "123 Main St"; icharge.Customer.Zip = "11111"; icharge.InvoiceNumber = "123456"; icharge.TransactionAmount = "1.00"; icharge.Sale(); Console.WriteLine(icharge.Response.Approved);

SagePay

icharge.Gateway = IchargeGateways.gwSagePay; icharge.GatewayURL = "https://test.sagepay.com"; //Test account is a public test account //If you are getting invalid IP, you need to add your IP //Login here (testvendor for all creds) //https://test.sagepay.com/MySagePay/loginpage.asp icharge.MerchantLogin = "testvendor"; icharge.MerchantPassword = "testvendor"; icharge.Card.Number = "4929000000006"; icharge.Card.CVVData = "123"; icharge.Card.ExpMonth = 01; icharge.Card.ExpYear = 15; icharge.Customer.FirstName = "John"; icharge.Customer.LastName = "Doe"; icharge.Customer.Address = "123 Nowhere Ln"; icharge.Customer.City = "MyCity"; icharge.Customer.State = "CA"; icharge.Customer.Zip = "90210"; icharge.Customer.Country = "US"; icharge.Customer.Phone = "55555555"; icharge.ShippingInfo.FirstName = icharge.Customer.FirstName; icharge.ShippingInfo.LastName = icharge.Customer.LastName; icharge.ShippingInfo.Address = icharge.Customer.Address; icharge.ShippingInfo.City = icharge.Customer.City; icharge.ShippingInfo.Zip = icharge.Customer.Zip; icharge.ShippingInfo.Country = icharge.Customer.Country; icharge.ShippingInfo.State = icharge.Customer.State; // Optional icharge.ShippingInfo.Phone = icharge.Customer.Phone; // Optional icharge.InvoiceNumber = randomClass.Next().ToString(); icharge.TransactionId = randomClass.Next().ToString(); icharge.TransactionAmount = "1.00"; icharge.TransactionDesc = "Stuff"; icharge.Sale();

Sage Payment Solutions

icharge.Gateway = IchargeGateways.gwSagePayments; //no test url for Sage Payments icharge.MerchantLogin = "************"; icharge.MerchantPassword = "************"; icharge.Customer.FirstName = "John"; icharge.Customer.LastName = "Smith"; icharge.Customer.Address = "123 Fake Street"; icharge.Customer.City = "Beverly Hills"; icharge.Customer.State = "CA"; icharge.Customer.Zip = "90210"; icharge.Customer.Country = "USA"; icharge.Customer.Email = "test@test.com"; icharge.Customer.Phone = "555-555-1234"; icharge.Customer.Fax = "555-555-4321"; icharge.Customer.Id = "123456"; icharge.Card.Number = "5499740000000057"; icharge.Card.ExpMonth = 1; icharge.Card.ExpYear = 15; icharge.InvoiceNumber = "inv" + randomClass.Next(1000); icharge.TransactionAmount = "6.00"; icharge.Sale();

Shift4

icharge.Gateway = IchargeGateways.gwShift4; icharge.GatewayURL = "https://utgapi.shift4test.com/api/rest/v1/"; // Login info icharge.MerchantLogin = "Merchant Id"; icharge.MerchantPassword = "Access Token"; icharge.Config("Shift4InterfaceName=YourInterfaceName"); icharge.Config("Shift4InterfaceVersion=YourInterfaceVersion"); // General info icharge.InvoiceNumber = "123456"; icharge.TransactionAmount = "10.55"; icharge.Customer.FirstName = "John"; icharge.Customer.LastName = "Smith"; icharge.Card.Number = "4321000000001119"; icharge.Card.CVVData = "333"; icharge.Card.ExpMonth = 2; icharge.Card.ExpYear = 20; icharge.Customer.Address = "890 Kifer Rd"; icharge.Customer.Zip = "89000"; icharge.Sale();

SkipJack

icharge.Gateway = IchargeGateways.gwSkipjack; //Test URL icharge.GatewayURL = "https://developer.skipjackic.com/scripts/evolvcc.dll?AuthorizeAPI"; //This is your 12 digit serial number icharge.MerchantLogin = "000111222333"; icharge.Card.ExpMonth = 2; icharge.Card.ExpYear = 11; icharge.Card.Number = "4242 4242 4242 4242"; icharge.Customer.Address = "1234 Nowhere Ln"; icharge.Customer.City = "Beverly Hills"; icharge.Customer.Country = "US"; icharge.Customer.Email = "nobody@server.com"; icharge.Customer.FirstName = "John"; icharge.Customer.Id = "CUSTOMER1"; icharge.Customer.LastName = "Smith"; icharge.Customer.Phone = "555-555-5555"; icharge.Customer.State = "CA"; icharge.Customer.Zip = "90210"; icharge.InvoiceNumber = "1234"; icharge.TransactionAmount = "1.00"; icharge.TransactionDesc = "Test Transaction"; icharge.Sale();

Sterling

Icharge icharge = new Icharge(); icharge.Gateway = IchargeGateways.gwSterling; icharge.GatewayURL = "https://certify.securenet.com/API/gateway.svc/webHttp/ProcessTransaction"; //This is your SecureNet ID and Secure Key icharge.MerchantLogin = "YourLogin"; icharge.MerchantPassword = "YourPassword"; icharge.Card.Number = "4111111111111111"; icharge.Card.ExpMonth = 12; icharge.Card.ExpYear = 21; icharge.InvoiceNumber = "testinvoice"; icharge.TestMode = true; icharge.TransactionAmount = "123.45"; icharge.TransactionId = "APP12345"; icharge.Sale(); Debug.WriteLine(icharge.Response.Approved ? "Transaction Approved" : "Transaction Declined" + icharge.Response.ErrorText); Debug.WriteLine(icharge.Config("RawRequest")); Debug.WriteLine(icharge.Config("RawResponse"));

Square

This API has been deprecated, and Square has announce plans to discontinue it on September 1st 2021. For their new API, use Square Payments instead.

Icharge icharge = new Icharge(); icharge.Gateway = IchargeGateways.gwSquare; //This your API Key icharge.MerchantLogin = "YOUR API KEY"; // Square also requires that you set a location Id for all ICharge requests, and // a unique idempotency key for each Sale/Auth-Only/Refund request. Refer to the // Square documentation (https://docs.connect.squareup.com) for more information. icharge.Config("SquareLocationId=YOUR LOCATION ID"); icharge.Config("SquareIdempotencyKey=" + DateTime.Now.Ticks); // The ICharge component can only be used to charge a transaction with a card // nonce that is already generated via Square's payment form. The following is // a test card nonce from https://docs.connect.squareup.com/testing/test-values icharge.Config("CardToken=fake-card-nonce-ok"); // Alternatively, a Square customer card Id can be used instead of a card nonce. // In this case, a Square customer Id must also be specified. This will cause the // card on file in the specified customer profile to be used as the payment method. // (Just keep in mind: If a card nonce is specified using the CardToken config, it // will *always* take precedence over a customer card Id!) // Note that you can specify a customer Id anytime... icharge.Customer.Id = "fake-customer-id-ok"; // ...But you *must* specify a customer Id in order to use a customer card Id. icharge.Config("SquareCustomerCardId=fake-customer-card-id-ok"); icharge.Customer.FirstName = "Fake"; icharge.Customer.LastName = "Person"; icharge.Customer.Address = "123 Nowhere Ln"; icharge.Customer.Address2 = "Apt 999"; icharge.Customer.City = "Chapel Hill"; icharge.Customer.State = "NC"; icharge.Customer.Zip = "27517"; icharge.Customer.Country = "US"; icharge.Customer.Email = "fake@fake.com"; icharge.ShippingInfo.FirstName = "Unreal"; icharge.ShippingInfo.LastName = "Human"; icharge.ShippingInfo.Address = "456 WhereAmI Dr"; icharge.ShippingInfo.Address2 = "Apt 0"; icharge.ShippingInfo.City = "Secret"; icharge.ShippingInfo.State = "NC"; icharge.ShippingInfo.Zip = "77777"; icharge.ShippingInfo.Country = "US"; icharge.InvoiceNumber = "1234567"; icharge.TransactionDesc = "test"; icharge.TransactionAmount = "100"; //100 means $1.00 icharge.Sale();

Square Payments

Icharge icharge = new Icharge(); icharge.Gateway = IchargeGateways.gwSquare; //This your API Key icharge.MerchantLogin = "YOUR API KEY"; // Square also requires that you set a unique idempotency key for each // Sale/Auth-Only/Refund request. Refer to the Square documentation // (https://developer.squareup.com/reference/square) for more information. icharge.Config("SquareIdempotencyKey=" + DateTime.Now.Ticks); // The ICharge component can only be used to charge a transaction with a card // nonce that is already generated via Square's payment form. The following is // a test card nonce from // https://developer.squareup.com/docs/testing/test-values#square-api-endpoint-testing icharge.Config("CardToken=cnon:card-nonce-ok"); // Alternatively, a Square customer card Id can be used instead of a card nonce. // In this case, a Square customer Id must also be specified. This will cause the // card on file in the specified customer profile to be used as the payment method. // Note that you can specify a customer Id anytime... icharge.Customer.Id = "fake-customer-id-ok"; // ...But you *must* specify a customer Id in order to use a customer card Id. icharge.Config("CardToken=ccof:customer-card-id-ok"); icharge.Customer.FirstName = "Fake"; icharge.Customer.LastName = "Person"; icharge.Customer.Address = "123 Nowhere Ln"; icharge.Customer.Address2 = "Apt 999"; icharge.Customer.City = "Chapel Hill"; icharge.Customer.State = "NC"; icharge.Customer.Zip = "27517"; icharge.Customer.Country = "US"; icharge.Customer.Email = "fake@fake.com"; icharge.ShippingInfo.FirstName = "Unreal"; icharge.ShippingInfo.LastName = "Human"; icharge.ShippingInfo.Address = "456 WhereAmI Dr"; icharge.ShippingInfo.Address2 = "Apt 0"; icharge.ShippingInfo.City = "Secret"; icharge.ShippingInfo.State = "NC"; icharge.ShippingInfo.Zip = "77777"; icharge.ShippingInfo.Country = "US"; icharge.InvoiceNumber = "1234567"; icharge.TransactionDesc = "test"; icharge.TransactionAmount = "100"; //100 means $1.00 icharge.Sale();

Stripe

Icharge icharge = new Icharge(); icharge.Gateway = IchargeGateways.gwStripe; // No Test URL for this Gateway //This is your API Key icharge.MerchantLogin = "Your API Key"; // No merchant passowrd for this Gateway icharge.Card.Number = "4111111111111111"; icharge.Card.ExpMonth = 12; icharge.Card.ExpYear = 2021; icharge.Card.CVVData = "999"; icharge.Config("DynamicDescriptor=/n software tests"); icharge.TransactionAmount = "100"; icharge.TransactionDesc = "AuthOnly Test"; //Customer Information icharge.Customer.FirstName = "John"; icharge.Customer.LastName = "Doe"; icharge.Customer.Email = "JohnDoe@example.com"; icharge.Customer.Address = "123 Nowhere Ln"; icharge.Customer.Address2 = "Ste 200"; icharge.Customer.City = "Chapel Hill"; icharge.Customer.State = "NC"; icharge.Customer.Zip = "27716"; icharge.Customer.Country = "US"; icharge.Customer.Phone = "9199197993"; //Shipping Information icharge.Config("StripeShippingCarrier=FedEx"); icharge.Config("StripeShippingTrackingNumber=12345678910"); icharge.ShippingInfo.FirstName = "John"; icharge.ShippingInfo.LastName = "Doe"; icharge.ShippingInfo.Phone = "123 456 7891"; icharge.ShippingInfo.Address = "600 Market St"; icharge.ShippingInfo.Address2 = "Ste 300"; icharge.ShippingInfo.City = "Chapel Hill"; icharge.ShippingInfo.State = "NC"; icharge.ShippingInfo.Zip = "27516"; icharge.ShippingInfo.Country = "US"; //Metadata information can be passed using the AddSpecialField method icharge.AddSpecialField("TestName1", "TestValue1"); icharge.AddSpecialField("TestName2", "TestValue2"); icharge.AddSpecialField("TestName3", "TestValue3"); icharge.AuthOnly(); Console.WriteLine(icharge.Response.Approved);

TransNational Bankcard

icharge.Gateway = IchargeGateways.gwTransNationalBankcard; //This is Username and Password provided by TransNational icharge.MerchantLogin = "0123456789"; icharge.MerchantPassword = "ABCDE12345"; icharge.Card.ExpMonth = 1; icharge.Card.ExpYear = 14; icharge.Card.Number = "4444333322221111"; icharge.Customer.Address = "1234 Nowhere Ln"; icharge.Customer.City = "Beverly Hills"; icharge.Customer.Country = "US"; icharge.Customer.Email = "nobody@server.com"; icharge.Customer.FirstName = "John"; icharge.Customer.Id = "CUSTOMER1"; icharge.Customer.LastName = "Smith"; icharge.Customer.Phone = "555-555-5555"; icharge.Customer.State = "CA"; icharge.Customer.Zip = "90210"; icharge.InvoiceNumber = "1234"; icharge.TransactionAmount = "1.00"; icharge.Sale();

USAePay

icharge.Gateway = IchargeGateways.gwUSAePay; //This is your UMKey/source key icharge.MerchantLogin = "1oJ62F...6Yn9J22"; //MerchantPassword is not used icharge.MerchantPassword = ""; // If a pin is associated with your source, send it with this config. //icharge.Config("HashSecret=yourpinhere"); icharge.Card.ExpMonth = 2; icharge.Card.ExpYear = 21; icharge.Card.Number = "4005562233445564"; icharge.Customer.Address = "1234 Nowhere Ln"; icharge.Customer.City = "Beverly Hills"; icharge.Customer.Country = "US"; icharge.Customer.Email = "nobody@server.com"; icharge.Customer.FirstName = "John"; icharge.Customer.Id = "CUSTOMER1"; icharge.Customer.LastName = "Smith"; icharge.Customer.Phone = "555-555-5555"; icharge.Customer.State = "CA"; icharge.Customer.Zip = "90210"; icharge.InvoiceNumber = "1234"; icharge.TransactionAmount = "1.00"; icharge.TransactionDesc = "Test Transaction"; icharge.Sale();

Veritas

Icharge icharge = new Icharge(); icharge.Gateway = IchargeGateways.gwVeritas; // No Test URL for this Gateway //This is your ActivationKey icharge.MerchantLogin = "ActivationKey"; icharge.Config("VeritasBankName=Bank of China"); icharge.Card.ExpMonth = 11; icharge.Card.ExpYear = 21; icharge.Card.Number = "4311111111111111"; icharge.Card.CVVData = "999"; icharge.Customer.FirstName = "John"; icharge.Customer.LastName = "Doe"; icharge.Customer.Address = "123 San Andres"; icharge.Customer.City = "Makati City"; icharge.Customer.State = "Metro Manila"; icharge.Customer.Zip = "1227"; icharge.Customer.Country = "PHL"; icharge.Customer.Email = "johndoe@gmail.com"; icharge.Customer.Phone = "09151234567"; icharge.TransactionAmount = "1.00"; icharge.TransactionId = "111820161146"; icharge.TransactionDesc = "Sale Transaction"; icharge.Sale(); Console.WriteLine(icharge.Response.Approved);

Worldpay Online

icharge.Gateway = IchargeGateways.gwWorldpayOnline; icharge.MerchantLogin = "[Your service key]"; icharge.Card.ExpMonth = 11; icharge.Card.ExpYear = 2025; icharge.Card.Number = "4444333322221111"; icharge.Card.CVVData = "123"; icharge.Customer.FullName = "John Doe"; icharge.Customer.Address = "123 Some Street"; icharge.Customer.Address2 = "Apt 456"; icharge.Customer.City = "Chapel Hill"; icharge.Customer.State = "NC"; icharge.Customer.Zip = "12345"; icharge.Customer.Country = "US"; icharge.Customer.Email = "johndoe@gmail.com"; icharge.Customer.Phone = "0123456789"; icharge.TransactionDesc = "/n software test"; icharge.AddSpecialField("orderCodePrefix", "nsoft_"); icharge.AddSpecialField("orderCodeSuffix", "_test"); icharge.TransactionAmount = "100"; // $1.00 icharge.Sale();

WorldPay XML

icharge.Gateway = IchargeGateways.gwWorldPayXML; //Test URL icharge.GatewayURL = "https://secure-test.wp3.rbsworldpay.com/jsp/merchant/xml/paymentService.jsp"; //This is your Merchant Code icharge.MerchantLogin = "MerchantCode"; //This is your Merchant Password icharge.MerchantPassword = "MerchantPassword"; icharge.Card.ExpMonth = 1; icharge.Card.ExpYear = 2020; icharge.Card.CVVData = "999"; icharge.Card.Number = "4444333322221111"; icharge.TransactionDesc = "Test transaction"; icharge.Customer.FullName = "J.J. Smith"; icharge.Customer.FirstName = "John"; icharge.Customer.LastName = "Smith"; icharge.Customer.Address = "123 Nowhere Ln"; icharge.Customer.Zip = "90210"; icharge.Customer.City = "Beverly Hills"; icharge.Customer.State = "CA"; icharge.Customer.Country = "US"; icharge.Customer.Email = "x@y.com"; icharge.TransactionAmount = "125"; ; icharge.InvoiceNumber = "1234567890123460" + icharge.TransactionAmount; icharge.Sale();

YKC

icharge.Gateway = IchargeGateways.gwYKC; icharge.GatewayURL = "https://www.e-bos.jp/ykcsettlement/independent/SCR43000.aspx"; //This is the cliid value icharge.MerchantLogin = "g-0000000"; icharge.Card.Number = "4263982640269299"; icharge.Card.ExpMonth = 4; icharge.Card.ExpYear = 2012; icharge.Card.CardType = TCardTypes.ctVisa; icharge.Card.CVVData = "999"; icharge.Customer.Id = "0000"; icharge.Customer.Address = "123 Nowhere Ln"; icharge.Customer.Zip = "90210"; icharge.Customer.Country = "840"; icharge.Customer.Email = "nobody@server.com"; icharge.Customer.Phone = "11111111111"; icharge.Customer.FirstName = "FirstName"; icharge.Customer.LastName = "LastName"; icharge.TransactionAmount = "1"; icharge.TransactionId = "A Unique ID"; icharge.Config("CurrencyCode=JPY"); icharge.Sale();

We appreciate your feedback. If you have any questions, comments, or suggestions about this article please contact our support team at support@4dpayments.com.