TSYSLevel3 Component
Properties Methods Events Configuration Settings Errors
The TSYSLevel3 component is a tool used to create Level3 Corporate Purchasing Card addendum aggregates, which can then be passed to the TSYSSETTLE component and settled.
Syntax
nsoftware.InPayDirect.Tsyslevel3
Remarks
This TSYSLevel3 component creates Level III addendum data, which can be sent in the settlement to achieve a better interchange rate when accepting corporate purchasing cards. The Level III addendum allows the merchant to send very detailed information about every item that was purchased by the card holder, as well as tax and shipping information.
This component creates a different addendum aggregate based on the CardType. Visa and MasterCard addendums differ slightly, and therefore a slightly different set of properties are required for each.
The following fields are valid for both ctVisa and ctMasterCard CardTypes.
- PurchaseIdentifier
- LocalTax
- NationalTax
- PurchaseOrder
- FreightAmount
- DutyAmount
- DestinationZip
- ShipFromZip
- DestinationCountry
- Description
- DiscountAmount
- ProductCode
- Quantity
- TaxAmount
- TaxRate
- Total
- Units
- MerchantTaxId
- CustomerTaxId
- CommodityCode
- DiscountAmount
- TaxInvoiceNumber
- OrderDate
- FreightTaxAmount
- FreightTaxRate
- CommodityCode
- UnitCost
Additional fields 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.DetailRecords.Add(new TSYSRecordType()); TSYSSettle.DetailRecords[0].DetailAggregate = 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.LineItems.Add(new TSYSLineItem()); TSYSLevel3.LineItems[0].CommodityCode = "fake"; TSYSLevel3.LineItems[0].Description = "hardware"; TSYSLevel3.LineItems[0].ProductCode = "productCode123"; TSYSLevel3.LineItems[0].Quantity = 1; TSYSLevel3.LineItems[0].Units = ""; TSYSLevel3.LineItems[0].UnitCost = "33"; TSYSLevel3.LineItems[0].TaxAmount = "0"; TSYSLevel3.LineItems[0].TaxRate = "0"; TSYSLevel3.LineItems[0].DiscountAmount = "0"; TSYSLevel3.LineItems[0].Total = "33"; TSYSLevel3.LineItems.Add(new TSYSLineItem()); TSYSLevel3.LineItems[1].CommodityCode = "fake"; TSYSLevel3.LineItems[1].Description = "hardware"; TSYSLevel3.LineItems[1].ProductCode = "productCode124"; TSYSLevel3.LineItems[1].Quantity = 1; TSYSLevel3.LineItems[1].Units = ""; TSYSLevel3.LineItems[1].UnitCost = "20"; TSYSLevel3.LineItems[1].TaxAmount = "0"; TSYSLevel3.LineItems[1].TaxRate = "0"; TSYSLevel3.LineItems[1].DiscountAmount = "0"; TSYSLevel3.LineItems[1].Total = "20"; // Finally, add the Level3 addendum to the same index in the settlement. TSYSSettle.DetailRecords[0].AddendumAggregate = TSYSLevel3.GetAddendum();
A Level III addendum for the ctMasterCard CardType is constructed similarly:
'First authorize the credit card TSYSECommerce1.TransactionAmount = "200" TSYSECommerce.Authorize() 'Then, put the result into the settlement component TSYSSettle.DetailRecordCount = 2 TSYSSettle.DetailAggregate[1] = TSYSECommerce.GetDetailAggregate() 'Now build the Level3 Extension. TSYSLevel3.cardType = ctMasterCard TSYSLevel3.LocalTax = "EXEMPT" TSYSLevel3.NationalTax = "0" TSYSLevel3.PurchaseOrder = "cardholderRefId" TSYSLevel3.FreightAmount = "0" TSYSLevel3.DutyAmount = "0" TSYSLevel3.DestinationZip = "27709" TSYSLevel3.ShipFromZip = "27709" TSYSLevel3.DestinationCountry = "USA" TSYSLevel3.AlternateTaxAmount = "0" TSYSLevel3.AlternateTaxId = "altTaxId" 'Begin adding line items: TSYSLevel3.LineItems.Add(new TSYSLineItem()); TSYSLevel3.LineItems[0]. TSYSLevel3.LineItems[0].Description = "bolt" TSYSLevel3.LineItems[0].ProductCode = "BOLT6x20" TSYSLevel3.LineItems[0].Quantity = 2 TSYSLevel3.LineItems[0].Units = "each" TSYSLevel3.LineItems[0].TaxRate = "0" TSYSLevel3.LineItems[0].TaxType = "taxType" TSYSLevel3.LineItems[0].TaxAmount = "0" TSYSLevel3.LineItems[0].DiscountAmount = "0" TSYSLevel3.LineItems[0].TaxIncluded = False TSYSLevel3.LineItems[0].Total = "100" TSYSLevel3.LineItems[0].DiscountAmount = "0" TSYSLevel3.LineItems[0].DiscountRate = "0" TSYSLevel3.LineItems.Add(new TSYSLineItem()); TSYSLevel3.LineItems[1].Description = "flange nut" TSYSLevel3.LineItems[1].ProductCode = "FLANGE6" TSYSLevel3.LineItems[1].Quantity = 1 TSYSLevel3.LineItems[1].Units = "each" TSYSLevel3.LineItems[1].TaxRate = "0" TSYSLevel3.LineItems[1].TaxType = "taxType" TSYSLevel3.LineItems[1].TaxAmount = "0" TSYSLevel3.LineItems[1].DiscountAmount = "0" TSYSLevel3.LineItems[1].TaxIncluded = False TSYSLevel3.LineItems[1].Total = "100" TSYSLevel3.LineItems[1].DiscountAmount = "0" TSYSLevel3.LineItems[1].DiscountRate = "0" // Finally, add the Level3 addendum to the same index in the settlement. TSYSSettle1.DetailRecords[1].AddendumAggregate = TSYSLevel3.GetAddendum();
Note that while Level3 addendum data is only applicable to corporate purchasing cards, however you may send Level3 data for all Visa and Master Card cards if you wish.
Property List
The following is the full list of the properties of the component with short descriptions. Click on the links for further details.
AlternateTaxAmount | Secondary tax amount (only applicable in some countries). |
AlternateTaxId | Tax Id number of the merchant that reported the AlternateTaxAmount . |
CardType | The card type for which a Level2 or Level3 addendum will be created. |
CommodityCode | Code indicating the type of goods or services sold. |
CustomerTaxId | Customer's Value Added Tax registration number. |
DestinationCountry | Country the goods are to be shipped to. |
DestinationZip | Zip code the goods are to be shipped to. |
DiscountAmount | Amount of any discount subtracted from the line item totals. |
DutyAmount | Duty fees (if any) for imported goods. |
FreightAmount | Shipping charges associated with this transaction. |
FreightTaxAmount | Portion of the FreightAmount that is tax. |
FreightTaxRate | Rate used to calculate the FreightTaxAmount . |
LineItems | A collection of line items to be included in the Level III addendum. |
LocalTax | Amount of local or state taxes that are a part of this transaction. |
MerchantTaxId | Merchant's government tax Id number. |
NationalTax | Amount of federal or national taxes that are a part of this transaction. |
OrderDate | Date of the order in YYMMDD format. |
PurchaseIdentifier | Optional purchase order number assigned by the merchant. |
PurchaseOrder | Purchase Order Number supplied by the cardholder. |
ShipFromZip | Zip code the goods are being shipped from. |
TaxInvoiceNumber | Unique Value Added Tax Invoice Reference Number. |
Method List
The following is the full list of the methods of the component with short descriptions. Click on the links for further details.
Config | Sets or retrieves a configuration setting . |
GetAddendum | Returns a Level III Purchasing card addendum based on the specified CardType . |
Reset | Clears all properties to their default values. |
Event List
The following is the full list of the events fired by the component with short descriptions. Click on the links for further details.
Error | Information about errors during data delivery. |
Configuration Settings
The following is a list of configuration settings for the component with short descriptions. Click on the links for further details.
UseFractionalQuantities | Allows the use of fractional quantities in the ItemQuantity property. |
CodePage | The system code page used for Unicode to Multibyte translations. |