E-Payment Gateway Retail Code Examples


This KB entry includes simple sample code for different gateways supported in the Retail component.

Below are code examples for different gateways supported in the Retail Component. 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

Authorize.NET

Retail retail = new Retail(); retail.Gateway = RetailGateways.gwAuthorizeNet; retail.GatewayURL = "https://test.authorize.net/gateway/transact.dll"; retail.TestMode = true; //This corresponds to the x_login field and is your API Login ID retail.MerchantLogin = "x_login"; //This corresponds to the x_tran_key field and is your API Login ID retail.MerchantPassword = "x_tran_key"; retail.Card.EntryDataSource = EntryDataSources.edsTrack1; retail.Card.MagneticStripe = "B4005519200000004^FDMS TEST CARD /VISA^211210054321000000000000000150 A"; retail.TransactionAmount = "1.00"; retail.InvoiceNumber = "1234"; retail.Sale();

Authorize.NET XML API

retail.Gateway = RetailGateways.gwAuthorizeNetXML; retail.GatewayURL = "https://apitest.authorize.net/xml/v1/request.api"; //This corresponds to the Name element. retail.MerchantLogin = "Name"; //This corresponds to the TransactionKey element. retail.MerchantPassword = "TransactionKey"; retail.Card.EntryDataSource = EntryDataSources.edsTrack1; retail.Card.MagneticStripe = "B4005519200000004^FDMS TEST CARD /VISA^211210054321000000000000000150 A"; retail.Customer.Address = "1234 Nowhere Ln"; retail.Customer.City = "Beverly Hills"; retail.Customer.Country = "US"; retail.Customer.Email = "nobody@server.com"; retail.Customer.FirstName = "John"; retail.Customer.Id = "CUSTOMER1"; retail.Customer.LastName = "Smith"; retail.Customer.Phone = "555-555-5555"; retail.Customer.State = "CA"; retail.Customer.Zip = "90210"; retail.TransactionDesc = "Retail Sale Test"; retail.TransactionAmount = "1.00"; retail.InvoiceNumber = "1234"; retail.TransactionAmount = "1.00"; retail.Sale();

Bank of America

Retail retail = new Retail(); retail.Gateway = RetailGateways.gwBankOfAmerica; retail.GatewayURL = "https://api.demo.globalgatewaye4.firstdata.com/transaction/v12"; //This is your ExactID retail.MerchantLogin = "ExactID"; //This is your Password retail.MerchantPassword = "Password"; //This is your FDMSKeyId retail.Config("FDMSKeyId=YourFDMSKeyId"); //This is your HashSecret retail.Config("HashSecret=YourHashSecret"); retail.Card.EntryDataSource = EntryDataSources.edsTrack1; retail.Card.MagneticStripe = "%B4111111111111111^FDMS TEST CARD /VISA^211210054321000000000000000150 A?"; retail.Customer.FullName = "John Smith"; retail.Customer.Address = "1234 Nowhere Ln"; retail.Customer.Zip = "90210"; retail.Customer.Email = "nobody@server.com"; retail.InvoiceNumber = "1234"; retail.TransactionAmount = "1.00"; retail.Sale();

BASYS

Retail retail = new Retail(); retail.Gateway = RetailGateways.gwBASYS; //This is your Merchant Id retail.MerchantLogin = "ID"; //This is your Merchant Password retail.MerchantPassword = "Password"; //This must be set to True so both Track 1 and Track 2 data are sent in the request retail.Config("CardEncrypted=True"); //This must include both Track 1 and Track 2 Data retail.Card.MagneticStripe = "%B5454545454545454^CHASE PAYMENTECH TEST CARD^18121015432112345601?;5454545454545454=18121015432112345601?"; retail.TransactionAmount = "1.00"; retail.InvoiceNumber = "123"; retail.Sale();

Bluefin

Retail retail = new Retail(); retail.Gateway = RetailGateways.gwBluefin; retail.GatewayURL = "https://cert.payconex.net/api/qsapi/3.8"; //This is your Account Id retail.MerchantLogin = "YourAccountId"; //This is your API Access Key retail.MerchantPassword = "YourAPIAccessKey"; retail.Card.EntryDataSource = EntryDataSources.edsTrack1; retail.Card.MagneticStripe = "%B4111111111111111^FDMS TEST CARD /VISA^211210054321000000000000000150 A?"; retail.Customer.FullName = "John Smith"; retail.Customer.Address = "1234 Nowhere Ln"; retail.Customer.Zip = "90210"; retail.Customer.Email = "nobody@server.com"; retail.TransactionAmount = "1.00"; retail.Sale();

BluePay

Retail retail = new Retail(); retail.Gateway = RetailGateways.gwBluePay; retail.GatewayURL = "https://secure.bluepay.com/interfaces/bp20post"; //This is your User ID retail.Config("TerminalId=YourUserID"); //This is your Account ID retail.MerchantLogin = "YourAccountID"; //This is your Secret Key retail.MerchantPassword = "YourSecretKey"; retail.Card.EntryDataSource = EntryDataSources.edsTrack1; retail.Card.MagneticStripe = "%B4111111111111111^FDMS TEST CARD /VISA^211210054321000000000000000150 A?"; retail.Customer.FullName = "company name1"; retail.Customer.FirstName = "Tom"; retail.Customer.LastName = "John"; retail.Customer.Address = "1000 Central Dr."; retail.Customer.City = "Dallas"; retail.Customer.State = "TX"; retail.Customer.Zip = "75251"; retail.Customer.Country = "USA"; retail.Customer.Phone = "111-222-3333"; retail.Customer.Email = "aaa@bbb.com"; retail.TransactionAmount = "1235.12"; retail.InvoiceNumber = "12345"; retail.TransactionDesc = "test desc"; retail.AuthCode = "123456"; retail.TestMode = true; retail.Sale();

BrainTree

Retail retail = new Retail(); retail.Gateway = RetailGateways.gwBrainTree; //This is your Username retail.MerchantLogin = "Username"; //This is your Password retail.MerchantPassword = "Password"; retail.Card.EntryDataSource = EntryDataSources.edsTrack1; retail.Card.MagneticStripe = "%B4111111111111111^FDMS TEST CARD /VISA^211210054321000000000000000150 A?"; retail.Customer.Address = "123 Nowhere Ln"; retail.Customer.Zip = "90210"; retail.Customer.Country = "840"; retail.TransactionAmount = "100"; retail.TransactionAmount = "2.21"; retail.InvoiceNumber = "5554321"; retail.Sale();

CyberSource

Retail retail = new Retail(); retail.Gateway = RetailGateways.gwCyberSource; retail.GatewayURL = "https://ics2wstest.ic3.com/commerce/1.x/transactionProcessor/"; //This is your username retail.MerchantLogin = "nsoft_test1"; //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. retail.MerchantPassword = "zGPlQkNsxuzLqzt......UGJ8WJMdbCGw=="; retail.Card.EntryDataSource = EntryDataSources.edsTrack1; retail.Card.MagneticStripe = "%B4111111111111111^FDMS TEST CARD /VISA^211210054321000000000000000150 A?"; retail.Customer.FirstName = "John"; retail.Customer.LastName = "Doe"; retail.Customer.Email = "nobody@cybersource.com"; retail.Customer.Phone = "408-556-9100"; retail.Customer.Address = "1295 Charleston Rd."; retail.Customer.City = "Mountain View"; retail.Customer.State = "CA"; retail.Customer.Zip = "94043-1307"; retail.Customer.Country = "US"; retail.InvoiceNumber = "12"; retail.TransactionAmount = "4.59"; retail.Sale();

eProcessing

Retail retail = new Retail(); retail.Gateway = RetailGateways.gwEprocessing; //Credentials came from EProcessing Specifications //This is your ePNAccount retail.MerchantLogin = "080880"; //This is your Password retail.MerchantPassword = "080880pw"; //This is your RestrictKey retail.AddSpecialField("RestrictKey", "yFqqXJh9Pqnugfr"); retail.Card.EntryDataSource = EntryDataSources.edsTrack1; retail.Card.MagneticStripe = "B4005519200000004^FDMS TEST CARD /VISA^211210054321000000000000000150 A"; retail.Customer.Address = "1234 Nowhere Ln"; retail.Customer.City = "Beverly Hills"; retail.Customer.Country = "US"; retail.Customer.Email = "nobody@server.com"; retail.Customer.FirstName = "John"; retail.Customer.Id = "CUSTOMER1"; retail.Customer.LastName = "Smith"; retail.Customer.Phone = "555-555-5555"; retail.Customer.State = "CA"; retail.Customer.Zip = "90210"; retail.TransactionDesc = "Test Transaction"; retail.InvoiceNumber = "1234"; retail.TransactionAmount = "1.00"; retail.Sale();

First Data E4 / Payeezy

Retail retail = new Retail(); retail.Gateway = RetailGateways.gwFirstDataE4; retail.GatewayURL = "https://api.demo.globalgatewaye4.firstdata.com/transaction/v12"; //This is your ExactID retail.MerchantLogin = "ExactID"; //This is your Password retail.MerchantPassword = "Password"; //This is your FDMSKeyId retail.Config("FDMSKeyId=YourFDMSKeyId"); //This is your HashSecret retail.Config("HashSecret=YourHashSecret"); retail.Card.EntryDataSource = EntryDataSources.edsTrack1; retail.Card.MagneticStripe = "%B4111111111111111^FDMS TEST CARD /VISA^211210054321000000000000000150 A?"; retail.Customer.FullName = "John Smith"; retail.Customer.Address = "1234 Nowhere Ln"; retail.Customer.Zip = "90210"; retail.Customer.Email = "nobody@server.com"; retail.InvoiceNumber = "1234"; retail.TransactionAmount = "1.00"; retail.Sale();

First Data PayPoint

Retail retail = new Retail(); retail.Gateway = RetailGateways.gwFirstDataPayPoint; retail.GatewayURL = "https://apiuat.thepayplace.com/epay/epaywebservice.asmx"; //This is your Application ID retail.MerchantLogin = "Application ID"; //This is your Security Key retail.MerchantPassword = "Security Key"; retail.Card.EntryDataSource = EntryDataSources.edsTrack1; retail.Card.MagneticStripe = "%B4111111111111111^FDMS TEST CARD /VISA^211210054321000000000000000150 A?"; retail.Card.ExpMonth = 12; retail.Card.ExpYear = 15; retail.Card.Number = "4111111111111111"; retail.Customer.FullName = "John Smith"; retail.Customer.Address = "1234 Nowhere Ln"; retail.Customer.Zip = "90210"; retail.Customer.Email = "nobody@server.com"; retail.TransactionAmount = "4.76"; retail.Sale();

Go E-Merchant

Retail retail = new Retail(); retail.Gateway = RetailGateways.gwGoEMerchant; //This is your merchant key retail.MerchantLogin = "1264"; //This is your merchant password retail.MerchantPassword = "password"; retail.Card.EntryDataSource = EntryDataSources.edsTrack1; retail.Card.MagneticStripe = "%B4111111111111111^FDMS TEST CARD /VISA^211210054321000000000000000150 A?"; retail.Customer.Address = "123 Test St"; retail.Customer.Zip = "12345-6789"; retail.InvoiceNumber = "123456789"; retail.TransactionAmount = "1.00"; retail.Sale();

Heartland

Retail retail = new Retail(); retail.Gateway = RetailGateways.gwHeartland; retail.GatewayURL = "https://cert.api2.heartlandportico.com/Hps.Exchange.PosGateway/PosGatewayService.asmx"; //This is your Username retail.MerchantLogin = "Username"; //This is your Password retail.MerchantPassword = "Password"; //Required. This is issued by Heartland during registration. retail.Config("HeartlandLicenseId=12345"); //Required. This is issued by Heartland during registration. retail.Config("HeartlandSiteId=12345"); //Required. This is issued by Heartland during registration. retail.Config("HeartlandDeviceId=12345678"); retail.Card.EntryDataSource = EntryDataSources.edsTrack1; retail.Card.MagneticStripe = "%B4111111111111111^FDMS TEST CARD /VISA^211210054321000000000000000150 A?"; retail.Customer.Address = "6860 Dallas Pkwy"; retail.Customer.Zip = "750241234"; retail.InvoiceNumber = 1.00; retail.TransactionAmount = "1.00"; retail.Sale();

Intuit Payment Solutions

Retail retail = new Retail(); retail.Gateway = RetailGateways.gwIntuitPaymentSolutions; //This is your Merchant Echo Id retail.MerchantLogin = "EchoId"; //This is your Merchant PIN retail.MerchantPassword = "PIN"; retail.Card.EntryDataSource = EntryDataSources.edsTrack1; retail.Card.MagneticStripe = "%B4005550000000019^FDMS TEST CARD /VISA^211210054321000000000000000150 A?"; retail.Customer.Address = "1234 Nowhere Ln"; retail.Customer.City = "Beverly Hills"; retail.Customer.Country = "US"; retail.Customer.Email = "nobody@server.com"; retail.Customer.FirstName = "John"; retail.Customer.Id = "CUSTOMER1"; retail.Customer.LastName = "Smith"; retail.Customer.Phone = "555-555-5555"; retail.Customer.State = "CA"; retail.Customer.Zip = "90210"; retail.TransactionAmount = "1213456789"; retail.InvoiceNumber = "123456789"; retail.TransactionDesc = "Test Transaction"; retail.Sale();

iTransact

Retail retail = new Retail(); retail.Gateway = RetailGateways.gwITransact; //This is your Vendor Id retail.MerchantLogin = "VendorId"; retail.Card.EntryDataSource = EntryDataSources.edsTrack1; retail.Card.MagneticStripe = "B4005519200000004^FDMS TEST CARD /VISA^211210054321000000000000000150 A"; retail.Customer.Address = "1234 Nowhere Ln"; retail.Customer.City = "Beverly Hills"; retail.Customer.Country = "US"; retail.Customer.Email = "nobody@server.com"; retail.Customer.FirstName = "John"; retail.Customer.Id = "CUSTOMER1"; retail.Customer.LastName = "Smith"; retail.Customer.Phone = "555-555-5555"; retail.Customer.State = "CA"; retail.Customer.Zip = "90210"; retail.TransactionAmount = "1.00"; retail.InvoiceNumber = "1234"; retail.TransactionDesc = "Test Transaction"; retail.Sale();

JetPay

Retail retail = new Retail(); retail.Gateway = RetailGateways.gwJetPay; retail.GatewayURL = "https://test1.jetpay.com/jetpay"; //TerminalID, assigned by JetPay LLC retail.MerchantLogin = "TESTMERCHANT"; //This is your Password retail.MerchantPassword = "xxx"; //TransactionID is required for this gateway. //String, exactly 18 characters long, which contains a unique value." icharge.TransactionId = "MyTestID1234567890"; retail.Card.EntryDataSource = EntryDataSources.edsTrack1; retail.Card.MagneticStripe = "%B4111111111111111^FDMS TEST CARD /VISA^211210054321000000000000000150 A?"; retail.Customer.FullName = "John Smith"; retail.Customer.Address = "8800 Central Dr."; retail.Customer.City = "Dallas"; retail.Customer.State = "TX"; retail.Customer.Zip = "75251"; retail.Customer.Country = "USA"; retail.Customer.Phone = "214-890-1800"; retail.TransactionAmount = "8799"; retail.InvoiceNumber = "test2"; retail.Sale();

LinkPoint, YourPay, FirstData

Retail retail = new Retail(); retail.Gateway = RetailGateways.gwLinkPoint; retail.GatewayURL = "staging.linkpt.net:1129"; retail.TestMode = false; //This is your Store Number retail.MerchantLogin = "Store Number"; //MerchantPassword is not used. Instead a SSL client certificate is used. retail.SSLCert = new Certificate(CertStoreTypes.cstPEMKeyFile, "..\\..\\files\\linkpoint.pem", "", "*"); retail.Card.EntryDataSource = EntryDataSources.edsTrack1; retail.Card.MagneticStripe = "%B4111111111111111^FDMS TEST CARD /VISA^211210054321000000000000000150 A?"; retail.Customer.Address = "1234 Nowhere Ln"; retail.Customer.City = "Beverly Hills"; retail.Customer.Country = "US"; retail.Customer.Email = "nobody@server.com"; retail.Customer.FirstName = "John"; retail.Customer.Id = "CUSTOMER1"; retail.Customer.LastName = "Smith"; retail.Customer.Phone = "555-555-5555"; retail.Customer.State = "CA"; retail.Customer.Zip = "90210"; retail.TransactionId = "12345"; retail.InvoiceNumber = "12345"; retail.TransactionAmount = "10.00"; retail.TransactionDesc = "Test Transaction"; retail.Sale();

Litle / Vantiv

Retail retail = new Retail(); retail.Gateway = RetailGateways.gwLitle; retail.GatewayURL = "https://prelive.litle.com/vap/communicator/online"; //User retail.MerchantLogin = "User"; //Password retail.MerchantPassword = "Password"; //Merchant ID retail.Config("MerchantCode=MerchantId"); retail.Card.EntryDataSource = EntryDataSources.edsTrack1; retail.Card.MagneticStripe = "%B4111111111111111^FDMS TEST CARD /VISA^211210054321000000000000000150 A?"; retail.TransactionAmount = "100"; retail.Customer.Address = "123 Nowhere Ln."; retail.Customer.Zip = "90210"; retail.TransactionDesc = "TestTrans"; retail.InvoiceNumber = "123456789"; retail.Sale();

Merchant e-Soultions

Retail retail = new Retail(); retail.Gateway = RetailGateways.gwMerchantESolutions; retail.GatewayURL = "https://test.merchante-solutions.com/mes-api/tridentApi"; //This is your Profile ID retail.MerchantLogin = "00000000000000000000"; //This is your Merchant Key retail.MerchantPassword = "tkcnB....VItsDnuD"; retail.Card.EntryDataSource = EntryDataSources.edsTrack1; retail.Card.MagneticStripe = "%B5123012301230120^FDMS TEST CARD /MCRD^211210054321000000000000000150 A?"; retail.Customer.Zip = "55555"; retail.Customer.Address = "123"; retail.Customer.Id = "1234"; retail.TransactionAmount = "1.00"; retail.InvoiceNumber = "12345"; retail.Sale();

Net Billing

Retail retail = new Retail(); retail.Gateway = RetailGateways.gwNetBilling; //This is your Account ID retail.MerchantLogin = "000000000000"; retail.Card.EntryDataSource = EntryDataSources.edsTrack1; retail.Card.MagneticStripe = "%B4005519200000004^FDMS TEST CARD /VISA^171210054321000000000000000150 A?"; retail.Customer.Address = "1234 Nowhere Ln"; retail.Customer.City = "Beverly Hills"; retail.Customer.Country = "US"; retail.Customer.Email = "nobody@server.com"; retail.Customer.FirstName = "John"; retail.Customer.Id = "CUSTOMER1"; retail.Customer.LastName = "Smith"; retail.Customer.Phone = "555-555-5555"; retail.Customer.State = "CA"; retail.Customer.Zip = "90210"; retail.TransactionAmount = "1.00"; retail.TransactionDesc = "Test Transaction"; retail.InvoiceNumber = "1234"; retail.Sale();

Network Merchants

Retail retail = new Retail(); retail.Gateway = RetailGateways.gwNetworkMerchants; retail.MerchantLogin = "demo"; retail.MerchantPassword = "password"; retail.Card.EntryDataSource = EntryDataSources.edsTrack1; retail.Card.MagneticStripe = "%B4111111111111111^FDMS TEST CARD /VISA^211210054321000000000000000150 A?"; retail.Customer.Address = "123 Nowhere Ln"; retail.Customer.Zip = "90210"; retail.Customer.Country = "840"; retail.TransactionAmount = "100"; retail.Sale();

Pay Direct

Retail retail = new Retail(); retail.Gateway = RetailGateways.gwPayDirect; retail.GatewayURL = "https://paydirectapi.ca.link2gov.com/"; // This is your L2G Merchant Code retail.MerchantLogin = "merchantcode"; //This si your Settle Merchant Code retail.Config("PayDirectSettleMerchantCode=settlecode"); //This is your Password retail.MerchantPassword = "testpass"; retail.Card.EntryDataSource = EntryDataSources.edsTrack1; retail.Card.MagneticStripe = "%B4055011111111111^FDMS TEST CARD /VISA^211210054321000000000000000150 A?"; retail.Customer.Address = "1234 Nowhere Ln"; retail.Customer.City = "Beverly Hills"; retail.Customer.Country = "US"; retail.Customer.Email = "nobody@server.com"; retail.Customer.FirstName = "John"; retail.Customer.Id = "CUSTOMER1"; retail.Customer.LastName = "Smith"; retail.Customer.Phone = "555-555-5555"; retail.Customer.State = "CA"; retail.Customer.Zip = "90210"; retail.TransactionAmount = "1.00"; retail.InvoiceNumber = "1234"; retail.TransactionDesc = "Test Transaction"; retail.Sale();

PayFlowPro

Retail retail = new Retail(); retail.Gateway = RetailGateways.gwPayFlowPro; retail.GatewayURL = "https://pilot-payflowpro.paypal.com"; //This is your Vendor name retail.MerchantLogin = "nsofttest"; //This is your Password retail.MerchantPassword = "password"; //This is the Partner field. By default it is PayPal. retail.AddSpecialField("PARTNER", "VeriSign"); retail.Card.EntryDataSource = EntryDataSources.edsTrack1; retail.Card.MagneticStripe = "%B4111111111111111^FDMS TEST CARD /VISA^211210054321000000000000000150 A?"; retail.TransactionId = "123"; retail.Customer.Address = "1234 Nowhere Ln"; retail.Customer.City = "Beverly Hills"; retail.Customer.Country = "US"; retail.Customer.Email = "nobody@server.com"; retail.Customer.FirstName = "John"; retail.Customer.Id = "CUSTOMER1"; retail.Customer.LastName = "Smith"; retail.Customer.Phone = "555-555-5555"; retail.Customer.State = "CA"; retail.Customer.Zip = "90210"; retail.TransactionAmount = "1.00"; retail.InvoiceNumber = "1234"; retail.TransactionDesc = "Test Transaction"; retail.Sale();

PayLeap

Retail retail = new Retail(); retail.Gateway = RetailGateways.gwPayLeap; retail.GatewayURL = "https://uat.payleap.com/TransactServices.svc/ProcessCreditCard"; //This is your UserName retail.MerchantLogin = "UserName"; //This is your Password retail.MerchantPassword = "Password"; retail.Card.EntryDataSource = EntryDataSources.edsTrack1; retail.Card.MagneticStripe = "%B4111111111111111^FDMS TEST CARD /VISA^211210054321000000000000000150 A?"; retail.Customer.FullName = "John Smith"; retail.Customer.Zip = "90210"; retail.Customer.Address = "123 Nowhere Ln."; retail.TransactionAmount = "1.00"; retail.InvoiceNumber = "123456"; retail.AddSpecialField("Force", "T"); retail.Sale();

Payments Gateway

Retail retail = new Retail(); retail.Gateway = RetailGateways.gwPaymentsGateway; retail.GatewayURL = "https://www.paymentsgateway.net/cgi-bin/posttest.pl"; //This is your Merchant Id retail.MerchantLogin = "ID"; //This is your Merchant Password retail.MerchantPassword = "Password"; retail.Card.EntryDataSource = EntryDataSources.edsTrack1; retail.Card.MagneticStripe = "%B4200000000000000^FDMS TEST CARD /VISA^211210054321000000000000000150 A?"; retail.Customer.Address = "1234 Nowhere Ln"; retail.Customer.City = "Beverly Hills"; retail.Customer.Country = "US"; retail.Customer.Email = "nobody@server.com"; retail.Customer.FirstName = "John"; retail.Customer.Id = "CUSTOMER1"; retail.Customer.LastName = "Smith"; retail.Customer.Phone = "555-555-5555"; retail.Customer.State = "CA"; retail.Customer.Zip = "90210"; retail.InvoiceNumber = "1234"; retail.TransactionAmount = "1.08"; retail.TransactionDesc = "Test Transaction"; retail.Sale();

Payment Worksuite

Retail retail = new Retail(); retail.Gateway = RetailGateways.gwPaymentWorkSuite; retail.GatewayURL = "https://services.pwsdemo.com/CreditCardTransactionService.svc"; //This is your Username retail.MerchantLogin = "Username"; //this is your Password retail.MerchantPassword = "Password"; //This is your Client Code retail.Config("PaymentWorkSuiteClientCode=nsoftware"); //This is your Terminal Id retail.Config("TerminalId=nsoftware"); //This is your Location Code retail.Config("PaymentWorkSuiteLocationCode=nsoftware"); //This is your Merchant Code retail.Config("PaymentWorkSuiteMerchantCode=356"); retail.Card.MagneticStripe = "%B4111111111111111^FDMS TEST CARD /VISA^211210054321000000000000000150 A?"; retail.Customer.FullName = "John Smith"; retail.Customer.Address = "1234 Nowhere Ln"; retail.Customer.Zip = "90210"; retail.TransactionAmount = "1.00"; retail.TransactionId = "123456789"; retail.InvoiceNumber = "123456789"; retail.Sale();

Payscape

retail = new Retail(); retail.Gateway = RetailGateways.gwPayscape; //This is your username. For testing you may use "demo" retail.MerchantLogin = "demo"; //This is your password. For testing you may use "password" retail.MerchantPassword = "password"; retail.Card.EntryDataSource = EntryDataSources.edsTrack1; retail.Card.MagneticStripe = "%B4111111111111111^FDMS TEST CARD /VISA^211210054321000000000000000150 A?"; retail.Customer.Address = "123 Nowhere Ln"; retail.Customer.Zip = "90210"; retail.Customer.Country = "840"; retail.TransactionAmount = "100"; retail.Sale();

PayTrace

Retail retail = new Retail(); retail.Gateway = RetailGateways.gwPayTrace; retail.GatewayURL = "https://paytrace.com/api/default.pay"; //Username provided by PayTrace retail.MerchantLogin = "demo123"; //Password provided by PayTrace retail.MerchantPassword = "demo123"; retail.Card.EntryDataSource = EntryDataSources.edsTrack1; retail.Card.MagneticStripe = "%B4111111111111111^FDMS TEST CARD /VISA^211210054321000000000000000150 A?"; retail.TestMode = true; retail.Timeout = 600; retail.Customer.Address = "8320"; retail.Customer.Zip = "85284"; retail.TransactionAmount = "1.00"; retail.Sale();

PhoeniXGate

Retail retail = new Retail(); retail.Gateway = RetailGateways.gwPhoeniXGate; //This is your Merchant Id retail.MerchantLogin = "ID"; //This is your Merchant Password retail.MerchantPassword = "Password"; //This must be set to True so both Track 1 and Track 2 data are sent in the request retail.Config("CardEncrypted=True"); //This must include both Track 1 and Track 2 Data retail.Card.MagneticStripe = "%B5454545454545454^CHASE PAYMENTECH TEST CARD^18121015432112345601?;5454545454545454=18121015432112345601?"; retail.TransactionAmount = "1.00"; retail.InvoiceNumber = "123"; retail.Sale();

PlanetPayment iPay

Retail retail = new Retail(); retail.Gateway = RetailGateways.gwPlanetPayment; retail.GatewayURL = "https://uap.txngw.com"; //This corresponds to the REQUEST KEY value. //It is your assigned processing account number (COMPANY_KEY) retail.MerchantLogin = "9990"; //This is your 4 digit PIN or Encryption Key retail.MerchantPassword = "1234"; //This is your TERMINAL_ID retail.Config("TerminalId=6177"); retail.Card.EntryDataSource = EntryDataSources.edsTrack1; retail.Card.MagneticStripe = "%B4111111111111111^FDMS TEST CARD /VISA^211210054321000000000000000150 A?"; retail.TransactionAmount = "1.00"; retail.InvoiceNumber = "cc1"; retail.Customer.FullName = "J.J.J. Smith"; retail.Customer.FirstName = "John"; retail.Customer.LastName = "Smith"; retail.Customer.Address = "123 Nowhere Ln"; retail.Customer.Zip = "90210"; retail.Customer.City = "Beverly Hills"; retail.Customer.State = "CA"; retail.Customer.Country = "US"; retail.Customer.Email = "x@y.com"; retail.Sale();

PlugNPay

Retail retail = new Retail(); retail.Gateway = RetailGateways.gwPlugNPay; //This is your UserName retail.MerchantLogin = "pnpdemo2"; //This is your Password retail.MerchantPassword = "55pnpdemo55"; retail.Card.EntryDataSource = EntryDataSources.edsTrack1; retail.Card.MagneticStripe = "%B4111111111111111^FDMS TEST CARD /VISA^211210054321000000000000000150 A?"; retail.Customer.Address = "1234 Nowhere Ln"; retail.Customer.City = "Beverly Hills"; retail.Customer.Country = "US"; retail.Customer.Email = "nobody@server.com"; retail.Customer.FirstName = "John"; retail.Customer.Id = "CUSTOMER1"; retail.Customer.LastName = "Smith"; retail.Customer.Phone = "555-555-5555"; retail.Customer.State = "CA"; retail.Customer.Zip = "90210"; retail.TransactionAmount = "1.00"; retail.InvoiceNumber = "1234"; retail.TransactionDesc = "Test Transaction"; retail.Sale();

QuickBooks Merchant Services (QBMS)

Retail retail = new Retail(); retail.Gateway = RetailGateways.gwQBMS; retail.GatewayURL = "https://merchantaccount.ptc.quickbooks.com/j/AppGateway"; //This is your Application Login retail.MerchantLogin = "app login"; //This is your Connection Ticket retail.MerchantPassword = "connection ticket"; retail.Card.EntryDataSource = EntryDataSources.edsTrack1; retail.Card.MagneticStripe = "%B4111111111111111^FDMS TEST CARD /VISA^211210054321000000000000000150 A?"; retail.TransactionAmount = "10.00"; retail.Customer.Address = "123 Nowhere Ln."; retail.Customer.Zip = "90210"; retail.TransactionId = "123456789"; retail.Sale();

Repay

Retail retail = new Retail(); retail.Gateway = RetailGateways.gwRepay; //This is your Merchant Id retail.MerchantLogin = "ID"; //This is your Merchant Password retail.MerchantPassword = "Password"; //This must be set to True so both Track 1 and Track 2 data are sent in the request retail.Config("CardEncrypted=True"); //This must include both Track 1 and Track 2 Data retail.Card.MagneticStripe = "%B5454545454545454^CHASE PAYMENTECH TEST CARD^18121015432112345601?;5454545454545454=18121015432112345601?"; retail.TransactionAmount = "1.00"; retail.InvoiceNumber = "123"; retail.Sale();

Shift4

Retail retail = new Retail(); retail.Gateway = RetailGateways.gwShift4; retail.GatewayURL = "https://utgapi.shift4test.com/api/rest/v1/"; //retail.GatewayURL = "http://localhost"; // Login info retail.MerchantLogin = "Merchant Id"; retail.MerchantPassword = "Access Token"; retail.Config("Shift4InterfaceName=YourInterfaceName"); retail.Config("Shift4InterfaceVersion=YourInterfaceVersion"); // General info retail.InvoiceNumber = "123456"; retail.TransactionAmount = "10.55"; retail.Customer.FirstName = "John"; retail.Customer.LastName = "Smith"; retail.Customer.Address = "890 Kifer Rd"; retail.Customer.Zip = "89000"; retail.Card.EntryDataSource = EntryDataSources.edsTrack1; retail.Card.MagneticStripe = "%B4321000000001119^TEST CARD /VISA^211210054321000000000000000150 A?"; // Device info retail.Config("TerminalManufacturer=<manufacturer>"); retail.Config("TerminalModel=<model>"); retail.Sale(); </model></manufacturer>

SkipJack

Retail retail = new Retail(); retail.Gateway = RetailGateways.gwSkipjack; retail.GatewayURL = "https://developer.skipjackic.com/scripts/evolvcc.dll"; //This is your 12 digit serial number retail.MerchantLogin = "000011112222"; retail.Card.EntryDataSource = EntryDataSources.edsTrack1; retail.Card.MagneticStripe = "%B4242424242424242^JOHN SMITH /VISA^211210054321000000000000000150 A?"; retail.Customer.Address = "1234 Nowhere Ln"; retail.Customer.City = "Beverly Hills"; retail.Customer.Email = "nobody@server.com"; retail.Customer.FirstName = "John"; retail.Customer.LastName = "Smith"; retail.Customer.State = "CA"; retail.Customer.Zip = "90210"; // This is required. retail.ShippingInfo.Phone = "555-555-5555"; retail.TransactionAmount = "123.34"; retail.InvoiceNumber = "TEST02"; retail.TransactionDesc = "Test Transaction"; retail.Sale();

Sterling XML

Retail retail = new Retail(); retail.Gateway = RetailGateways.gwSterling; retail.GatewayURL = "https://certify.securenet.com/API/gateway.svc/webHttp/ProcessTransaction"; //This is your SecureNet ID retail.MerchantLogin = "0123456789"; //This is your Secure Key retail.MerchantPassword = "ABCDE12345"; retail.Card.EntryDataSource = EntryDataSources.edsTrack1; retail.Card.MagneticStripe = "%B4111111111111111^FDMS TEST CARD /VISA^211210054321000000000000000150 A?"; retail.InvoiceNumber = "testinvoice"; retail.TestMode = true; retail.TransactionAmount = "123.45"; retail.TransactionId = "123456789"; retail.Sale();

Transaction Central

Retail retail = new Retail(); retail.Gateway = RetailGateways.gwTransactionCentral; retail.GatewayURL = "https://ws.cert.transfirst.com/creditcard.asmx"; //This is your MerchantID retail.MerchantLogin = "MerchantID"; //This is your RegKey retail.MerchantPassword = "RegKey"; retail.Card.EntryDataSource = EntryDataSources.edsTrack1; retail.Card.MagneticStripe = "%B4111111111111111^FDMS TEST CARD /VISA^211210054321000000000000000150 A?"; retail.TransactionAmount = "1.00"; retail.Customer.FirstName = "test"; retail.Customer.LastName = "test"; retail.Customer.Address = "123 Main"; retail.Customer.Zip = "97229"; retail.InvoiceNumber = "123456"; retail.TransactionDesc = "test trans"; retail.Sale();

Trust Commerce

Retail retail = new Retail(); retail.Gateway = RetailGateways.gwTrustCommerce; //This is your Customer Id retail.MerchantLogin = "Customer Id"; //This is your Password retail.MerchantPassword = "Password"; retail.Card.EntryDataSource = EntryDataSources.edsTrack1; retail.Card.MagneticStripe = "%B4111111111111111^FDMS TEST CARD /VISA^211210054321000000000000000150 A?"; retail.Customer.Address = "1234 Nowhere Ln"; retail.Customer.City = "Beverly Hills"; retail.Customer.Country = "US"; retail.Customer.Email = "nobody@server.com"; retail.Customer.FirstName = "John"; retail.Customer.Id = "CUSTOMER1"; retail.Customer.LastName = "Smith"; retail.Customer.Phone = "555-555-5555"; retail.Customer.State = "CA"; retail.Customer.Zip = "90210"; retail.ShippingInfo.Address = "123 Street"; retail.TransactionAmount = "100"; retail.InvoiceNumber = "1234"; retail.TransactionDesc = "Test Transaction"; retail.Sale();

USAePay

Retail retail = new Retail(); retail.Gateway = RetailGateways.gwUSAePay; retail.GatewayURL = "https://sandbox.usaepay.com/gate"; //This is your UMKey/source key retail.MerchantLogin = "_Fc5a9U638Tq.....LrBmY1OR7A"; retail.Card.EntryDataSource = EntryDataSources.edsTrack1; retail.Card.MagneticStripe = "%B4111111111111111^FDMS TEST CARD /VISA^211210054321000000000000000150 A?"; retail.Customer.Address = "1234 Nowhere Ln"; retail.Customer.City = "Beverly Hills"; retail.Customer.Country = "US"; retail.Customer.Email = "nobody@server.com"; retail.Customer.FirstName = "John"; retail.Customer.Id = "CUSTOMER1"; retail.Customer.LastName = "Smith"; retail.Customer.Phone = "555-555-5555"; retail.Customer.State = "CA"; retail.Customer.Zip = "90210"; retail.TransactionAmount = "1.00"; retail.InvoiceNumber = "1234"; retail.TransactionDesc = "Test Transaction"; retail.Sale(); Retail retail = new Retail(); retail.Gateway = RetailGateways.gwWorldPayLink; //This is your Account Id retail.MerchantLogin = "Account Id"; //This is your Merchant Pin retail.MerchantPassword = "Merchant Pin"; //This is your SubId retail.AddSpecialField("subid", "NSOFT"); retail.Card.MagneticStripe = "%B4446661234567892^WORLDPAY/TEST^21121010000?;4446661234567892=21121010000?"; retail.TransactionAmount = "1.00"; retail.Sale();

WorldPay XML

Retail retail = new Retail(); retail.Gateway = RetailGateways.gwWorldPayXML; retail.GatewayURL = "https://secure-test.wp3.rbsworldpay.com/jsp/merchant/xml/paymentService.jsp"; //This is your Merchant Code retail.MerchantLogin = "CARDMATT"; //This is your Merchant Password retail.MerchantPassword = "MerchantPassword"; //This is your Terminal Id retail.Config("TerminalId=YourTerminalId"); retail.Card.EntryDataSource = EntryDataSources.edsTrack1; retail.Card.MagneticStripe = "%B4111111111111111^FDMS TEST CARD /VISA^211210054321000000000000000150 A?"; retail.TransactionDesc = "Test transaction"; retail.Customer.FullName = "J.J.J. Smith"; retail.Customer.FirstName = "John"; retail.Customer.LastName = "Smith"; retail.Customer.Address = "123 Nowhere Ln"; retail.Customer.Zip = "90210"; retail.Customer.City = "Beverly Hills"; retail.Customer.State = "CA"; retail.Customer.Country = "US"; retail.Customer.Email = "x@y.com"; retail.TransactionAmount = "125"; retail.InvoiceNumber = "1234567890123460"; retail.Sale();

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