GetAddendum Method
Returns a Level III Purchasing card addendum based on the specified CardType .
Syntax
char* GetAddendum();
Remarks
The type of addendum created by this class depends upon the value of the CardType property. Different addendums are created when the CardType is set to ctVisa or ctMasterCard, and different properties are required for the two different CardTypes.
The following properties are valid for both ctVisa and ctMasterCard CardTypes.
- PurchaseIdentifier
- LocalTax
- NationalTax
- PurchaseOrder
- FreightAmount
- DutyAmount
- DestinationZip
- ShipFromZip
- DestinationCountry
- LineItemDescription
- LineItemDiscountAmount
- LineItemProductCode
- LineItemQuantity
- LineItemTaxAmount
- LineItemTaxRate
- LineItemTotal
- LineItemUnits
- MerchantTaxId
- CustomerTaxId
- CommodityCode
- DiscountAmount
- TaxInvoiceNumber
- OrderDate
- FreightTaxAmount
- FreightTaxRate
- LineItemCommodityCode
- LineItemUnitCost
Additional properties for the ctMasterCard CardType include:
The following example illustrates how to build a Level III addendum for the ctVisa CardType:
'First authorize the credit card TSYSECommerce1.TransactionAmount = "53" TSYSECommerce.Authorize() 'Then, put the result into the settlement component TSYSSettle.DetailRecordCount = 1 TSYSSettle.DetailAggregate[0] = TSYSECommerce.GetDetailAggregate() 'Now build the Level3 Extension. 'The following properties are required for a Visa Corporate Purchasing Card: TSYSLevel3.CardType = ctVisa TSYSLevel3.LocalTax = "EXEMPT" TSYSLevel3.NationalTax = "0" TSYSLevel3.PurchaseOrder = "purchOrdNum" TSYSLevel3.MerchantTaxId = "merchantTaxId" TSYSLevel3.CustomerTaxId = "customerTaxId" TSYSLevel3.CommodityCode = "fake" TSYSLevel3.DiscountAmount = "0" TSYSLevel3.FreightAmount = "0" TSYSLevel3.DutyAmount = "0" TSYSLevel3.DestinationZip = "27709" TSYSLevel3.ShipFromZip = "27709" TSYSLevel3.DestinationCountry = "840" TSYSLevel3.TaxInvoiceNumber = "VATInvoiceRefNo" TSYSLevel3.OrderDate = "060526" TSYSLevel3.FreightTaxAmount = "0" TSYSLevel3.FreightTaxRate = "0" 'Begin adding line items: TSYSLevel3.LineItemCount = 2 TSYSLevel3.LineItemCommodityCode(0) = "fake" TSYSLevel3.LineItemDescription(0) = "hardware" TSYSLevel3.LineItemProductCode(0) = "productCode123" TSYSLevel3.LineItemQuantity(0) = 1 TSYSLevel3.LineItemUnits(0) = "" TSYSLevel3.LineItemUnitCost(0) = "33" TSYSLevel3.LineItemTaxAmount(0) = "0" TSYSLevel3.LineItemTaxRate(0) = "0" TSYSLevel3.LineItemDiscountAmount(0) = "0" TSYSLevel3.LineItemTotal(0) = "33" TSYSLevel3.LineItemCommodityCode(1) = "fake" TSYSLevel3.LineItemDescription(1) = "hardware" TSYSLevel3.LineItemProductCode(1) = "productCode124" TSYSLevel3.LineItemQuantity(1) = 1 TSYSLevel3.LineItemUnits(1) = "" TSYSLevel3.LineItemUnitCost(1) = "20" TSYSLevel3.LineItemTaxAmount(1) = "0" TSYSLevel3.LineItemTaxRate(1) = "0" TSYSLevel3.LineItemDiscountAmount(1) = "0" TSYSLevel3.LineItemTotal(1) = "20" 'Finally, add the Level3 addendum to the same index in the settlement. TSYSSettle.DetailRecordAddendum(0) = TSYSLevel31.GetAddendum()