E-Payment Integrator 2016 Node.js Edition
E-Payment Integrator 2016 Node.js Edition
Questions / Feedback?

GetAggregate Method

Returns an aggregate containing level 3 details for a transaction.

Syntax

level3.getAggregate([callback])

Callback

The 'callback' parameter specifies a function which will be called when the operation completes (or an error is encountered). If the 'callback' parameter is not specified, then the method will block and will not return until the operation completes (or an error is encountered).

The callback for this method is defined as:

function(err, data){ }

'err' is the error that occurred. If there was no error, then 'err' is 'null'.

'data' is the value returned by the method.

'err' has 2 properties which hold detailed information:

err.code
err.message

Remarks

This method returns an aggregate containing the level 3 data specified. This aggregate must be passed to the ICharge class's Level3Aggregate property in order for the level 3 data to be sent in the transaction. Each gateway has different requirements when processing level 3 transactions. Please refer to Level3 to identify which properties are required for the gateway you are implementing.

An example of how this method is used is shown below:


  Level2.PONumber = "123456789"
  Level2.ShipToZip = "27713"
  Level2.TaxAmount = "1.23"
  Level2.IsTaxExempt = false
  ICharge.Level2Aggregate = Level2.GetAggregate()
  
  Level3.LineItemCount = 2
  Level3.LineItems[0].CommodityCode = "4900" // Books and printed materials
  Level3.LineItems[0].Description = "Reference manual"
  Level3.LineItems[0].DiscountAmount = "" // No discount
  Level3.LineItems[0].ProductCode = "ISBN123456"
  Level3.LineItems[0].Quantity = "2"
  Level3.LineItems[0].TaxAmount = "60"
  Level3.LineItems[0].TaxRate = "600" // 6.00 percent
  Level3.LineItems[0].Total = "1060"
  Level3.LineItems[0].UnitCost = "500"
  Level3.LineItems[0].Units = "each"

	Level3.LineItems.Add(new EPLineItem());
  Level3.LineItems[1].CommodityCode = "4900"
  Level3.LineItems[1].Description = "Quick Start manual"
  Level3.LineItems[1].DiscountAmount = ""
  Level3.LineItems[1].ProductCode = "ISBN654321"
  Level3.LineItems[1].Quantity = "1"
  Level3.LineItems[1].TaxAmount = "60"
  Level3.LineItems[1].TaxRate = "600" // 6.00 percent
  Level3.LineItems[1].Total = "1060"
  Level3.LineItems[1].UnitCost = "1000"
  Level3.LineItems[1].Units = "each"

 
 
Copyright (c) 2019 /n software inc. - All rights reserved.
E-Payment Integrator 2016 Node.js Edition - Version 16.0 [Build 7240]