Open troygilbert opened 6 years ago
What does the metadata look like exactly please?
Unfortunately OFX/SGML files are not valid xml, so simply delegating to SimpleXML doesn't work. I do wish there were an SGML parser we could piggyback off of.
This library does use SimpleXML, after bodging it up a bit, so it may be possible; though I'd rather have an explicit API for capturing metadata like this.
Do you have some anonymised sample data to show the structure of this metadata at all please?
This is what I added to Ofx.php:231
:
$transaction->cardNumber = (string)$t->CCACCTTO->ACCTID;
This represents the card number of the credit/debit card used for a specific transaction for accounts with multiple credit/debit cards.
I've not looked it up in any specifications, I just browsed the OFX file directly curious if the information was in there. ;-)
Hmm - does the ACCTID
in the (non-immediate) parent "credit account" node not already provide what you're looking for? - $creditAccount->accountNumber
on L210 here
It shows up there, but each transaction has the ID specified and they appear to be a mixture (as far as I can tell inspecting the resulting parsed data). (Wish I could provide some anonymized data, but I don't have the time to prepare that for you at the moment.)
Hi James, I'm gonna send you some anonymized data via email -- not posting here in case I did a bad job of anonymizing! ;-)
Thanks, received it; I'm not gonna be able to look at this for at least a couple months probably tho, got a lot of conferences/trips coming up I'm afraid :/
The OFX file includes some additional details for each transaction that are not captured when parsing. Would it be possible to extract those fields or include a
SimpleXMLElement
referencing the whole transaction so that other tools could pluck them out as needed? This seems to be the most straightforward way to extend the library without having to build a more extensive system.