After setting some basic feed properties, we are going to want to set some information on the IBiz Integrator OFX components.
In this example we are going to connect to American Express and download the transaction information for a specific account. Connecting and downloading transaction information from Credit Card companies is entirely encapsulated in the CCStatement component.
Code Listing 2
nsoftware.IBizOFX.Ccstatement card = new nsoftware.IBizOFX.Ccstatement();
card.OFXUser = "[User Name]";
card.OFXPassword = "[Password]";
card.FIUrl = "https://www99.americanexpress.com/myca/ofxdl/us/download?" +
card.FIId = "3101";
card.FIOrganization = "AMEX";
card.OFXAppId = "Money";
card.OFXAppVersion = "1400";
card.CardNumber = "[CardNumber]";
card.StartDate = "";
card.EndDate = "";
The OFX User and Password above represent the username and password used to login to American Express online for account management. Most credit card companies use the same user name and password for OFX retrieval as they do for online access. Some companies however require a special registration which provides a different user name and password for OFX integration. Follow the instructions for connecting with Quicken or Microsoft Money to find out about any special requirements for your financial institutions.
The Financial Institution properties (FI properties above) are all institution specific. These are required in order to connect to and download OFX data. If you have trouble finding the FI data for your bank or credit card account, contact /n software support for help finding the connection information.
In addition, we have set the OFXAppId and OFXAppVersion to replicate the values that Microsoft Money sends to retrieve transaction information. This is not a required step, however some financial institutions will only accept request from trusted clients.
Finally, set the CardNumber, StartDate, and EndDate to define the transaction set. CardNumber is used to tell American Express which cards transactions to provide in the event that you have multiple American Express cards. By leaving StartDate and EndDate empty, American Express will send all of the previous transactions still available on the server.
Why download the entire transaction set? Since this is a process that happens virtually in the background, this application doesn’t really concern itself with limiting the amount of data returned. In addition we are taking advantage of some RSS feed readers' abilities to only show new RSS items. Since Credit Card transactions don’t change, only the new transactions show up as new items through the feed reader. Downloading smaller transaction sets based on the last downloaded transactions is certainly a feature that can be integrated in the future.