I am building a php application using Ofx Parser Class from http://www.phpclasses.org/package/5778-PHP-Parse-and-extract-financial-records-from-OFX-files.html . But where can i get a sample ofx file to use this class and test my application?
Try searching "filetype:ofx" in google. I have found a couple there. If you need a whole bunch for a more complete test I don't know.
Easiest by far is to have an online bank account yourself that supports ofx downloads. But you're right; it's surprisingly difficult to find anything past a simplest case online.
I dug up this article on IBM developerWorks that includes a quick sample. It's on parsing ofx with php and helpfully shows the difference between a well-formed XML version of an ofx and the starting-tag only version you'll often find when you download from various banks, but even this sample is only one withdrawal and one deposit.
Try using https://github.com/wesabe/fixofx. It has a script called fakeofx.py
The fakeofx.py script generates real-ish-seeming OFX for testing and demo purposes. You can generate a few fake OFX files using the script, and upload them to Wesabe to try it out or demonstrate it without showing your real account data to anyone.
The script uses some real demographic data to make the fake transactions it lists look real, but otherwise it isn't at all sophisticated. It will randomly choose to generate a checking or credit card statement and has no options.
These are the two references I used. The first one is about the structure of and ofx file and the second one give you the connection information for the financial institutions.
© 2022 - 2024 — McMap. All rights reserved.