GetAddendum Method
Returns a Level 2 Purchasing card addendum based on the specified CardType .
Syntax
fdmslevel2.getAddendum([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
The properties required to build a Level 2 addendum depends upon the value of the CardType property. The following tables indicate which properties are valid for what card type:
American Express
- DestinationZip (required)
- PurchaseIdentifier (required)
- TaxAmount (required)
Visa
- PurchaseIdentifier (required)
- CommercialCardType (optional)
- InvoiceNumber (optional)
- DestinationCountry (optional)
- DestinationZip (optional)
- DiscountAmount (optional)
- DutyAmount (optional)
- FreightAmount (optional)
- FreightTaxAmount (optional)
- FreightTaxRate (optional)
- MerchantReference (optional)
- OrderDate (optional)
- ShippedFromZip (optional)
- TaxAmount (optional)
MasterCard
- MerchantTaxId (required)
- MerchantType (required)
- PurchaseIdentifier (required)
- TaxAmount (required)
- CommercialCardType (optional)
- DestinationCountry (optional)
- DestinationState (optional)
- DestinationZip (optional)
- DutyAmount (optional)
- FreightAmount (optional)
- MerchantReference (optional)
- ShippedFromZip (optional)
The following example illustrates how to add Level 2 data to a transaction to be settled:
FDMSECommerce.Authorize() FDMSLevel2.CardType = ctVisa FDMSLevel2.CommercialCardType = FDMSECommerce.ResponseCommercialCard FDMSLevel2.OrderDate = "060828" 'September 28th, 2006 FDMSLevel2.FreightTaxAmount = "0" FDMSLevel2.FreightAmount = "600" FDMSLevel2.PurchaseIdentifier = "123456PURCHID" FDMSLevel2.InvoiceNumber = "CUSTCODE" FDMSLevel2.ShippedToZip = "90210" FDMSLevel2.ShippedFromZip = "90210" FDMSLevel2.TaxAmount = "120" FDMSSettle.DetailRecordCount = 1 FDMSSettle.DetailRecordAggregate(0) = FDMSECommerce.GetDetailAggregate() FDMSSettle.DetailRecordAddendum(0) = FDMSLevel2.GetAddendum()