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 the complete list of available transaction parameters, see Trans Fields 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