Best Payment Gateways integration On website Sample Code like Stripe, Paypal, google payment, salesforce commerce cloud payment gateway

Loan Finance Calculator

USAePay Payment Gatwys Sample Code

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();

Stripe Payment Gateways Integration on Wocommerce store

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";

Square Payments instant payment gateway

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 = "Buffalo";
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();

HSBC payment systems in the us

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();

Leave a Comment

Your email address will not be published. Required fields are marked *