Code Monkey home page Code Monkey logo

Comments (6)

mkobetic avatar mkobetic commented on August 21, 2024

Ironically, bank account downloads don't seem to have the #14 problems, go figure 🤷‍♂️

from ofxgo.

aclindsa avatar aclindsa commented on August 21, 2024

Yikes. I'm reviewing the OFX spec now and am more confused than when I started looking at this. In addition to the issues you noted with start elements where end elements should be:

  1. <BANKMSGSET> should contain <BANKMSGSETV1>, not the other way around.
  2. Neither <BANKMSGSET> nor <BANKMSGSETV1> should contain <BANKMSGSRSV1> (either directly or indirectly)
  3. <BANKMSGSET> is only supposed to be contained in the <MSGSETLIST> tag in a a Profile Response, <PROFRS>. It is used to indicate which OFX banking features your bank's implementation provides, and has nothing to do with actually providing you with your account's statement...

This violates the spec quite creatively in more ways than I would've thought possible for only having added four tags. Out of morbid curiosity, have you been able to parse this file with any other programs or libraries?

In my opinion, this is beyond broken to the point that your bank really ought to fix it, and I don't see a great way to modify the shared internals of ofxgo to support it. That said, one thing we could do is to write a bmo_client.go which implements the Client interface. Most methods could be the standard ones, but its Request method would need to be modified to look like the current contents of clientRequest, except to call a modified copy of the ParseResponse() method containing your hack above to ignore these elements. You would then have to explicitly use this client when parsing OFX files from this bank, but it wouldn't pollute that parsing code for everyone.

What do you think?

from ofxgo.

mkobetic avatar mkobetic commented on August 21, 2024

OK, that's worse than I thought. These comments lead me to think that MSGSETs are more prominent (maybe optional for single set). If they are so obscure, then I'd say it's not worth making special concessions to output that's broken so severely.

from ofxgo.

aclindsa avatar aclindsa commented on August 21, 2024

Oops, sorry those comments were confusing. The documentation refers to each unique category of message as a "message set", so I grouped them the same way. The comments are of the elements which describe the capabilities and version of the set since they were named appropriately, but in hindsight that might not have been the best idea.

I'll leave it up to you whether we try to go for this or make a kludge that will get you back in business. I feel a little less dirty if the kludge is in its own file without affecting the main parsing code, so I'm okay with that.

from ofxgo.

mkobetic avatar mkobetic commented on August 21, 2024

It seems that the way the elements are used in the BMO output is completely wrong so I'd say it's not worth polluting the library with this nonsense. As i mentioned, fortunately I can simply filter those elements out outside of the library so there's not need to do it for my sake.

from ofxgo.

aclindsa avatar aclindsa commented on August 21, 2024

Sounds good. Let me know if you find anything else!

from ofxgo.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.