GetAddendum Method
Returns a Level 3 Purchasing card addendum based on the specified CardType .
Syntax
[VB.NET] Public Function GetAddendum() As String
[C#] public string GetAddendum();
Remarks
The type of addendum created by this component 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.
List of valid Line Item properties for Visa:
- Quantity (required)
- UnitCost (required)
- CommodityCode (optional)
- Description (optional)
- DiscountAmount (optional)
- ProductCode (optional)
- TaxAmount (optional)
- TaxRate (optional)
- Total (optional)
- Units (optional)
List of valid Line Item properties for Mastercard:
- Description (required)
- ProductCode (required)
- Quantity (required)
- Units (required)
- UnitCost (optional)
- Total (required)
- DiscountAmount (optional)
- TaxIncluded (required)
- TaxRate (required)
- TaxAmount (required)
- TaxType (required)
The following example illustrates how to build a Level 3 addendum for the ctVisa CardType:
'First, authorize the credit card FDMSECommerce.TransactionAmount = "2720" '$27.20 FDMSECommerce.Authorize() 'Then, put the result into the settlement component FDMSSettle.DetailRecords.Add(New FDMSRecordType(FDMSECommerce.GetDetailAggregate())) 'Then build the Level 2 portion FDMSLevel2.CardType = ctVisa FDMSLevel2.CommercialCardType = FDMSECommerce.ResponseCommercialCard FDMSLevel2.OrderDate = "060828" 'September 28th, 2006 FDMSLevel2.FreightTaxAmount = "0" FDMSLevel2.FreightAmount = "600" FDMSLevel2.PurchaseIdentifier = "123456PURCHID" FDMSLevel2.ShippedToZip = "90210" FDMSLevel2.ShippedFromZip = "90210" FDMSLevel2.TaxAmount = "120" 'Now build the Level 3 portion FDMSLevel3.CardType = ctVisa FDMSLineItem item = new FDMSLineItem(); item.Quantity = 2; item.UnitCost = "500"; // $13.99 item.Units = "each"; item.Total = "1060"; FDMSLevel3.LineItems.Add(item); item = new FDMSLineItem(); item.Quantity = 1; item.UnitCost = "1000"; item.Units = "each"; item.Total = "1060"; FDMSLevel3.LineItems.Add(item); 'Finally, add the Level 2 and Level 3 addendum data to the settlement at the same index 'as the associated transaction. FDMSSettle.DetailRecords[FDMSSettle.DetailRecords.Count()].AddendumAggregate = FDMSLevel2.GetAddendum() + FDMSLevel3.GetAddendum()