1
0
mirror of https://github.com/aclindsa/ofxgo.git synced 2024-10-30 05:20:05 -04:00
Commit Graph

25 Commits

Author SHA1 Message Date
David Alpert
01b26887af GH-39 relax ofx response parsing to support TYPE1 responses
Section 4.2.2.2 Type 1 Protocol Overview in the
[Open Financial Exchange Specification 2.2, Nov 26, 2017](https://www.ofx.net/downloads/OFX%202.2.pdf)
states that:

    Type 1 applies only to the request part of a message; the server response is unaffected.

Thus it appears that we can safely parse SECURITY:TYPE1
using the same logic that we parse SECURITY:NONE

As I understand it, Security:TYPE1 indicates that the
financial institution uses SSL enryption to protect
customer credentials in transit.  This applies
explicitly to the incoming requests which may
contain authentication as part of the request
but does not appear to cause any material changes
to the response format.

As a result it appears that we can safely parse
SECURITY:TYPE1 responess in the same way that
we parse SECURITY:NONE responsese.
2021-03-12 10:46:24 -05:00
Aaron Ross
2b8a79e4b7 review changes 2021-01-04 07:24:40 -05:00
Aaron Ross
0d93a42626 support SGML OFX responses with no line breaks
Some financial institutions (*cough* Wells Fargo *cough*) export OFX files as a single line, which is technically valid according to the v1 spec. In order to parse them correctly, `readSGMLHeaders` now uses a regular expression that allows for all whitespace/line breaks to be optionally excluded.

A new sample response (wellsfargo.qfx) has been added to document this behaviour.
2021-01-04 07:24:40 -05:00
John Starich
8ad638c7e2 Rename ofxgo_test package to ofxgo and remove self-imports/references
* Fix package in generate_constants.py
* Update generate_constants.py to use the new imports
2020-04-03 08:38:41 -04:00
John Starich
f19189de45 Add DecodeResponse and *Response.Valid() for fine-grained parse control 2020-03-31 11:42:08 -04:00
John Starich
677a09295a Continue parsing after hitting validation errors
Supports mixed-case severity for Ally Bank's Quicken downloads 🙄
2020-03-30 10:50:10 -04:00
John Starich
67e527c855 Support carriage returns on new lines 2019-06-26 06:23:52 -04:00
35c7116654 Add the ability to marshal a Response to SGML/XML and test it
This allows for ofxgo to be used to create well-formatted OFX from poor
OFX, or even be used to generate OFX from other formats for easier
importing into financial management software.

Test this functionality by adding "round trip" testing to all existing
tests - ensure that responses' content is the same after a round trip of
marshalling and unmarshalling them.
2019-03-02 07:03:11 -05:00
Martin Kobetic
0f6ceccd86 Work around missing blank line after last header
Detect when a newline doesn't follow the last header when parsing SGML and break out of the header-parsing loop early. Add an example .qfx file demonstrating the broken behavior we're working around and a test.
2019-01-04 11:18:55 -05:00
1e55cb8bd7 Switch to copy of encoding/xml with only that subdirectory 2017-10-02 09:21:56 -04:00
7f2ca5db0f Check Valid() when parsing responses 2017-04-17 20:37:40 -04:00
9bd9c01962 Add OFX version to Valid() calls
This allows for future differentiation based on different requirements
of different versions of the OFX specification.
2017-04-17 11:11:46 -04:00
0eba6741f2 Make the OFX spec version an 'enum' 2017-04-17 10:54:20 -04:00
d433a18df4 gofmt -s 2017-04-08 11:38:07 -04:00
cd39e4f8af Handle SGML responses with post-colon spaces in headers 2017-04-03 20:49:48 -04:00
42864dace3 Rename Response/Request Profile -> Prof
This is more in line with the rest, which match their OFX message set
names except for capitalization.
2017-04-03 19:50:16 -04:00
6618e031a7 Response: Use SignonRs.String() instead of a raw string 2017-03-31 15:30:10 -04:00
d07455d797 Improve some request/response documentation 2017-03-31 15:29:57 -04:00
f185d78d29 Generalize response parsing code
This removes the many decodeXXXMessageSet() functions and replaces them
with a large map and a single generic decodeMessageSet() function. Also
change Responses to satisfy the Message interface as pointer types
(instead of the raw types), add the full set of top-level message sets
(though most of them still lack any message-parsing ability), adjust the
message set names to more closely mirror their OFX names, and fixup
tests and the command-line client to match the above changes.
2017-03-31 11:54:43 -04:00
27a88ca703 Make Decode*MessageSet functions private to the library
These don't need to be exposed and clutter the auto-generated
documentation
2017-03-25 06:23:30 -04:00
f2cea7c6d4 Switch to own clone of xml encoding library 2017-03-22 20:59:40 -04:00
6491311dbc Move credit cards to the right message set
They don't belong in with the banking message set like they were, even
though they're in the same section in the spec...
2017-03-22 20:01:30 -04:00
a0e2c146e4 Add requesting/parsing security list 2017-03-20 21:07:58 -04:00
f59f3713c2 Add simple investment requests/responses
This is lacking (at least) parsing the list of securities frequently
sent with investment statements
2017-03-19 21:08:58 -04:00
8158868432 Reorganization 2017-03-17 21:35:26 -04:00