Get Started

Step 1: Get Started

Our first step when getting started is to call the setup function and enter merchant settings. In order to do this, we will need your application to store a setup string per computer.

This setup string must then be handed back to Gravity Payments prior to each transaction with the LoadSetup(string) call.

In your application’s workstation specific setup area, add a button called Gravity Payments Setup that makes the following call:

SaveInYourDB = easyIntegrator1.Setup (SaveInYourDB)

This will bring up the ChargeItPro Setup Screen.

For testing purposes, click the Quick Setup button. Next enter the Config Key, testabc123, and click Download Settings then click Save.

 

Please review our Sample Code for examples.

API program code examples

  • These code examples are written in Visual Basic and can be used with either API.
  • To run a code example, the instantiation statement **must** be updated with the name of the API chosen, for example: `Dim easyIntegrator1 As New EasyIntegrator`
    • For use with the OCX, you must include: `Dim easyIntegrator1 As New cipwin32.EasyIntegrator`
    • For use with the DLL, you would include: `Dim easyIntegrator1 As New cipeinet.EasyIntegrator`

Step 2: Create a transaction

To create a transaction you first need to fill in the desired fields via the easy Integrator.TransFields properties with the transaction data you wish to pass, for example, amount, cashier, transaction reference (invoice or sale number).

Once the fields are set you will call the desired transaction method. This will launch the processing interface and activate any connected hardware.

You can only set up the transactions below if your application is using the saved Setup string from Step One.

Available transaction parameters

For a complete list of all available transaction parameters, visit the Trans Field documentation.

CreditSale

Performs a standard credit card sale.

easyIntegrator1.LoadSetup(SaveInYourDB)
easyIntegrator1.Clear
easyIntegrator1.ConfigFields.AllowPartialApprovals = True
easyIntegrator1.TransFields.AmountTotal = 20.00 'unsigned with decimals
easyIntegrator1.TransFields.Cashier = "Phil"
easyIntegrator1.TransFields.TransactionReference = "Inv123456"
If easyIntegrator1.CreditSale() Then
  'transaction was approved
  'save easyIntegrator1.ResultsFields.UniqueTransID for
  '  tokenized transactions such as voids, returns and additional charges

CreditReturn

Performs a standard return of funds.

easyIntegrator1.LoadSetup(SaveInYourDB)
easyIntegrator1.Clear
easyIntegrator1.TransFields.AmountTotal = 20.00 'unsigned with decimals
easyIntegrator1.TransFields.Cashier = "Phil"
easyIntegrator1.TransFields.TransactionReference = "Inv123456"
If easyIntegrator1.CreditReturn() Then
  'transaction was approved
  'save easyIntegrator1.ResultsFields.UniqueTransID for
  '  tokenized transactions such as voids, returns and additional charges

GenericVoid

Cancels a transaction from being captured in settlement.

Tips on GenericVoid

  • Every transaction returns a ResultsFields.UniqueTransID.
  • TransFields.UniqueTransRef must be populated with this ID to identify which transaction to void.
  • GenericVoid can be used for all transactions. Gravity Payments will translate the void in cases where the original transaction doesn’t support voids. For example DebitSale transactions do not support voids. In this case Gravity Payments will transform the void into a CreditReturn to negate the sale.
  • AmountTotal is not needed and cannot be specified
  • Only the entire transactions can be voided. If you need to cancel a portion of a transaction, use a return transaction (or a sale if the original transaction was a return)
  • Only transactions in the open batch can be voided. Batches are typically closed at the end of the business day by the merchant.
easyIntegrator1.LoadSetup(SaveInYourDB)
easyIntegrator1.Clear
'use the previously saved easyIntegrator1.ResultsFields.UniqueTransID to identify which transaction to void
easyIntegrator1.TransFields.UniqueTransRef = UniqueTransIDFromPreviousTransaction
easyIntegrator1.TransFields.Cashier = "Phil"
easyIntegrator1.TransFields.TransactionReference = "Inv123456"
If easyIntegrator1.GenericVoid() Then
  'transaction was approved

Tokenized CreditSale

This will charge the card identified by the token without prompting for user interaction.

easyIntegrator1.LoadSetup(SaveInYourDB)
easyIntegrator1.Clear
'use the previously saved easyIntegrator1.ResultsFields.UniqueTransID to identify which card to charge
easyIntegrator1.TransFields.UniqueTransRef = UniqueTransIDFromPreviousTransaction
easyIntegrator1.ConfigFields.AllowPartialApprovals = True
easyIntegrator1.TransFields.AmountTotal = 20.00 'unsigned with decimals
easyIntegrator1.TransFields.Cashier = "Phil"
easyIntegrator1.TransFields.TransactionReference = "Inv123456"
If easyIntegrator1.CreditSale() Then
  'transaction was approved
  'save easyIntegrator1.ResultsFields.UniqueTransID for tokenized transactions such as voids, returns and additional charges

Tokenized CreditReturn

This will refund the card identified by the token without prompting for user interaction.

easyIntegrator1.LoadSetup(SaveInYourDB)
easyIntegrator1.Clear
'use the previously saved easyIntegrator1.ResultsFields.UniqueTransID to identify which card to refund
easyIntegrator1.TransFields.UniqueTransRef = UniqueTransIDFromPreviousTransaction
easyIntegrator1.TransFields.AmountTotal = 20.00 'unsigned with decimals
easyIntegrator1.TransFields.Cashier = "Phil"
easyIntegrator1.TransFields.TransactionReference = "Inv123456"
If easyIntegrator1.CreditReturn() Then
  'transaction was approved
  'save easyIntegrator1.ResultsFields.UniqueTransID for tokenized transactions such as voids, returns and additional charges

GiftAddValue

This will add value to a gift card.

easyIntegrator1.LoadSetup(SaveInYourDB)
easyIntegrator1.Clear
easyIntegrator1.TransFields.AmountTotal = 20.00 'unsigned with decimals
easyIntegrator1.TransFields.Cashier = "Phil"
easyIntegrator1.TransFields.TransactionReference = "Inv123456"
If easyIntegrator1.GiftAddValue() Then
  'transaction was approved
  'save easyIntegrator1.ResultsFields.UniqueTransID for voids

GiftRedeem

This will deduct value from a gift card.

easyIntegrator1.LoadSetup(SaveInYourDB)
easyIntegrator1.Clear
easyIntegrator1.TransFields.AmountTotal = 20.00 'unsigned with decimals
easyIntegrator1.TransFields.Cashier = "Phil"
easyIntegrator1.TransFields.TransactionReference = "Inv123456"
If easyIntegrator1.GiftRedeem() Then
  'transaction was approved
  'save easyIntegrator1.ResultsFields.UniqueTransID for voids

GiftBalance

This is used to check the current balance of a card.

easyIntegrator1.LoadSetup(SaveInYourDB)
easyIntegrator1.Clear
easyIntegrator1.TransFields.AmountTotal = 20.00 'unsigned with decimals
easyIntegrator1.TransFields.Cashier = "Phil"
easyIntegrator1.TransFields.TransactionReference = "Inv123456"
If easyIntegrator1.GiftBalance() Then
  'transaction was approved

Step 3: Read results and print receipt

When a transaction comes back as “True”, your application should read, save and print the following fields:

Available results fields and transaction types

For a complete list of results fields and transaction types, please review our full list on the EasyIntegrator Index.

Field Value Contains
TransFields.AmountTotal Returns actual amount processed if using the `AllowPartialApproval` flag
ResultsFields. AccountCardType ie VS, MC, AX etc
ResultsFields.AmountBalance current balance of Gift Card
ResultsFields.ApprovalNumberResult Approval Number
ResultsFields.BillingName Name of Card Holder
ResultsFields.MaskedAccount Masked Credit Card Number
ResultsFields.Signature Customer signature
ResultsFields. TransactionTyp type of transaction
ResultsFields.UniqueTransID used to void transaction

Signature Samples

Please review our Signature samples.

EMV receipt guidelines

Please review our EMV Receipt Guidelines.