FDMSLevel3 Class
Properties Methods Events Configuration Settings Errors
The FDMSLevel3 component is a tool used to create Level 3 Corporate Purchasing Card addendum aggregates, which can then be passed to the FDMSSETTLE component and settled.
Class Name
InPayDirect_FDMSLevel3
Procedural Interface
inpaydirect_fdmslevel3_open(); inpaydirect_fdmslevel3_close($res); inpaydirect_fdmslevel3_register_callback($res, $id, $function); inpaydirect_fdmslevel3_get_last_error($res); inpaydirect_fdmslevel3_get_last_error_code($res); inpaydirect_fdmslevel3_set($res, $id, $index, $value); inpaydirect_fdmslevel3_get($res, $id, $index); inpaydirect_fdmslevel3_do_config($res, $configurationstring); inpaydirect_fdmslevel3_do_getaddendum($res); inpaydirect_fdmslevel3_do_reset($res);
Remarks
This Level3Extension class creates Level 3 addendum data, which can be sent in the settlement to achieve a better interchange rate when accepting corporate purchasing cards. The Level 3 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 class 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.
List of valid Line Item properties for Visa:
- LineItemQuantity (required)
- LineItemUnitCost (required)
- LineItemCommodityCode (optional)
- LineItemDescription (optional)
- LineItemDiscountAmount (optional)
- LineItemProductCode (optional)
- LineItemTaxAmount (optional)
- LineItemTaxRate (optional)
- LineItemTotal (optional)
- LineItemUnits (optional)
List of valid Line Item properties for Mastercard:
- LineItemDescription (required)
- LineItemProductCode (required)
- LineItemQuantity (required)
- LineItemUnits (required)
- LineItemUnitCost (optional)
- LineItemTotal (required)
- LineItemDiscountAmount (optional)
- LineItemTaxIncluded (required)
- LineItemTaxRate (required)
- LineItemTaxAmount (required)
- LineItemTaxType (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.DetailRecordCount = 1
FDMSSettle.DetailRecordAggregate(0) = 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
FDMSLevel3.LineItemCount = 2
FDMSLevel3.ItemCommodityCode(0) =
"4900"
' Books and printed materials
FDMSLevel3.ItemDescription(0) =
"Reference manual"
FDMSLevel3.ItemDiscountAmount(0) =
""
' No discount
FDMSLevel3.ItemProductCode(0) =
"ISBN123456"
FDMSLevel3.ItemQuantity(0) =
"2"
FDMSLevel3.ItemTaxAmount(0) =
"60"
FDMSLevel3.ItemTaxRate(0) =
"600"
' 6.00 percent
FDMSLevel3.ItemTotal(0) =
"1060"
FDMSLevel3.ItemUnitCost(0) =
"500"
FDMSLevel3.ItemUnits(0) =
"each"
FDMSLevel3.ItemCommodityCode(1) =
"4900"
FDMSLevel3.ItemDescription(1) =
"Quick Start manual"
FDMSLevel3.ItemDiscountAmount(1) =
""
FDMSLevel3.ItemProductCode(1) =
"ISBN654321"
FDMSLevel3.ItemQuantity(1) =
"1"
FDMSLevel3.ItemTaxAmount(1) =
"60"
FDMSLevel3.ItemTaxRate(1) =
"600"
' 6.00 percent
FDMSLevel3.ItemTotal(1) =
"1060"
FDMSLevel3.ItemUnitCost(1) =
"1000"
FDMSLevel3.ItemUnits(1) =
"each"
'Finally, add the Level 2 and Level 3 addendum data to the settlement at the same index
'
as
the associated transaction.
FDMSSettle.DetailRecordAddendum(0) = FDMSLevel2.GetAddendum() & FDMSLevel3.GetAddendum()
A Level 3 addendum for the ctMasterCard CardType is constructed similarly:
NOTE: You must send both a Level 2 addendum and a Level 3 addendum together in the same DetailAddendum. Level 3 data cannot be processed without a corresponding Level2 aggregate (however, you can send Level 2 data without Level 3 data).
Property List
The following is the full list of the properties of the class with short descriptions. Click on the links for further details.
CardType | The card type for which a Level 2 or Level 3 addendum will be created. |
LineItemCount | The number of records in the Item arrays. |
ItemCommodityCode | Code indicating the type of goods or services sold. |
ItemDescription | Description of the item. |
ItemDiscountAmount | Amount of the discount for each line item (if any). |
ItemProductCode | Product code of the item purchased. |
ItemQuantity | Quantity of items in this Line Item. |
ItemTaxAmount | Tax on this individual item. |
ItemTaxIncluded | Net/Gross Indicator. |
ItemTaxRate | Tax rate used to calculate the TaxAmount . |
ItemTaxType | Type of tax charged in TaxAmount . |
ItemTotal | Total cost of this line item. |
ItemUnitCost | Cost of each individual item. |
ItemUnits | Unit of measure for this Line Item. |
Method List
The following is the full list of the methods of the class with short descriptions. Click on the links for further details.
Config | Sets or retrieves a configuration setting . |
GetAddendum | Returns a Level 3 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 class 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 class with short descriptions. Click on the links for further details.
CodePage | The system code page used for Unicode to Multibyte translations. |