Detail record storage type.
This type contains the XML aggregate for a single transaction, as well as an XML aggregate of any additional addenda to be added to the record at settlement. The fields contained by this type are listed below.
Optional Detail Record Addendum data (such as Level2 or Level3 data)
The DetailAggregate field contains an xml aggregate of the transaction retrieved from the FDMSECommerce, FDMSRetail, or FDMSDetailRecord component's GetDetailAggregate method. If you wish to accept corporate purchasing cards you will also need to send Level2, and possibly Level3 addendum data along with the DetailAggregate. The AddendumAggregate field takes an xml aggregate containing either Level2 or Level2 plus Level3 addendum data, which will be added to the DetailAggregate when sending the settlement. The AddendumAggregate may be created with either the FDMSLevel2 or FDMSLevel3 components, and then returned via those component's GetAddendum method.
'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"; //$6.00 FDMSLevel2.PurchaseIdentifier = "123456PURCHID"; FDMSLevel2.ShippedToZip = "90210"; FDMSLevel2.ShippedFromZip = "90210"; FDMSLevel2.TaxAmount = "120"; //$1.20 'Now build the Level 3 portion FDMSLevel3.CardType = ctVisa FDMSLineItem item = new FDMSLineItem(); item.Quantity = 2; item.UnitCost = "500"; // $5.00 item.Units = "each"; item.TaxAmount = "60"; //$0.60 item.Total = "1060"; //$10.60 FDMSLevel3.LineItems.Add(item); item = new FDMSLineItem(); item.Quantity = 25; item.QuantityExponent = "1"; item.UnitCost = "400"; //$4.00 item.Units = "each"; item.TaxAmount = "60"; //$0.60 item.Total = "1060"; //$10.60 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()
Set this field with xml aggregates of the transactions you wish to settle.
To settle previously authorized transactions, this field must be set with the xml aggregate returned from the FDMSECommerce, FDMSRetail, or FDMSDetailRecord component's GetDetailAggregate method. For instance:
On occasion, you may need to modify these aggregates before sending them to settlement. For instance, if you're running a restaurant you may need to add a gratuity to the charge. If you're accepting installment payments, you will need to add the installment info. To accomplish this, you may use the FDMSDetailRecord component.
For example, to add a gratuity to a charge:
FDMSDetailRecord.ParseAggregate(FDMSRetail.GetDetailAggregate()) FDMSDetailRecord.Gratuity = "500" FDMSDetailRecord.TransactionAmount = FDMSDetailRecord.TransactionAmount + FDMSDetailRecord.Gratuity FDMSSettle.DetailRecords.Add(New FDMSRecordType(FDMSDetailRecord.GetDetailAggregate()))
To settle a transaction authorized with the ttInstallment TransactionType, you must use the FDMSDetailRecord component to add the number of this installment and the total count of all installments to be made. For instance, if the purchase was for "Three easy payments of $19.95", and this is the first payment, then the installment number will be 1, and the installment count 3. An example is included below:
FDMSECommerce.TransactionType = ttInstallment FDMSECommerce.TransactionAmount = "1995" FDMSECommerce.Authorize() FDMSDetailRecord.ParseAggregate FDMSECommerce.GetDetailAggregate() FDMSDetailRecord.InstallmentCount = 3 FDMSDetailRecord.InstallmentNumber = 1 FDMSSettle.DetailRecords.Add(new FDMSRecordType(FDMSDetailRecord.GetDetailAggregate()))