ACHConverter Component
Properties Methods Events Configuration Settings Errors
The ACHConverter component is used to convert ACH files into XML, for the purpose of easy viewing and editing. The component can also convert this XML back into the ACH format, so it may later be processed by the ACH network. Validation of these files occurs during the translation process.
Syntax
nsoftware.InPay.Achconverter
Remarks
This component is used for translating ACH files back and forth between the complex data format used by the ACH network and simple XML. By representing an ACH file as an XML structure, the viewing, parsing, and editing of individual ACH records can be easily accomplished. An XML document can be built from scratch and then use the ACHConverter component to convert it to ACH format.
The ConvertACH and ConvertXML methods are used to go back and forth between the ACH format and XML formats. ConvertACH converts from ACH to XML, and ConvertXML converts from XML back into ACH format. The data to be converted is specified by SetInputStream, InputFile or InputString, and the results are written to SetOutputStream, OutputFile or OutputString.
When the parsing is taking place, the source file is checked for validity in several different ways. The format and sequence of the records in the file is checked, as well as the data in each field in a record. Any formatting error or incorrect data (for instance, a character in an numeric-only field) will cause the validity checks to fail. In addition, the totals in each Batch Control Record and in the final File Control Record are checked against values computed as the component parses each record (this last check may be overridden by the VerifyMode property).
For example:
ACHConverter1.InputFile = "c:\achtestfile.txt" ACHConverter1.OutputFile = "c:\xmltestfile.xml" ACHConverter1.VerifyMode = vmValidateTotals ACHConverter1.ConvertACH()
After the above code completes successfully, "c:\xmltestfile.xml" will contain the XML representation of the input ACH file. In addition, the following properties will be filled with information about the ACH file that was just parsed:
Note: The XML document created (and parsed) by this component is defined in the Schema property.
Property List
The following is the full list of the properties of the component with short descriptions. Click on the links for further details.
FileBatchCount | Total number of batches contained in the file. |
FileBlockCount | Total number of blocks in a file. |
FileCreditTotal | Total amount credited to the merchant's bank account. |
FileDebitTotal | Total amount debited from the merchant's bank account. |
FileEntryCount | Total number of entries in a file. |
FileEntryHash | Hash of the routing numbers from each detail record in the file. |
InputFile | Specifies the file to read data from when calling ConvertXML or ConvertACH . |
InputString | Data in memory to read from when calling ConvertXML or ConvertACH . |
OutputFile | Specifies the file data is written to when calling ConvertXML or ConvertACH . |
OutputString | Contains the results from ConvertXML or ConvertACH . |
Schema | Returns the XSD Schema used to create XML from ACH files. |
VerifyMode | Determines how the totals in the Batch and File control records are validated. |
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 . |
ConvertACH | Converts a file from ACH format into XML. |
ConvertXML | Converts an XML file into ACH format. |
Reset | Reset the internal state of the component and 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.
CloseStreamAfterConversion | If true, the component will close the output stream after conversion. |
CodePage | The system code page used for Unicode to Multibyte translations. |