euforic / banking.js

The Missing API for Banks - Get all of your transactions and balances using node

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

No response / no transactions with USAA

DanielSchaffer opened this issue · comments

I'm trying to use this module to download transaction data from USAA. I can't really tell if I'm even getting a response - it looks like the "res" parameter is just echoing the request, as there is no BANKMSGSRSV1 element (or any other ofx "response" elements, even the signon), only BANKMSGSRQV1. I'm not sure how much more info I can give you without posting my bank info, so let me know what else would be helpful.

What is the err response for the callback? What do you get for a response when you request a XML for the call back see the below example.

*please include response data as a gist for easier reading

banking.getStatement(bankInfo, 'xml', function(res, err){
    if(err) console.log(err)
    console.log(res);
});

Thanks for the quick response!

In the callback, the err parameter is null, and here is the xml content from the res parameter, with info redacted:

https://gist.github.com/4423161

could you attach a gist of your implementation minus your acct num an pin

Here is what I ran - nothing special, I was just testing it out in the node console:

https://gist.github.com/4445179

@DanielSchaffer I just updated to support newer versions of OFX give it a try and let me know if it fixes things for you. Also double check that your bank allows for ofx direct connect. Some banks give access but you have to enable it and /or pay for it.

Closing due to inactivity reopen if still an issue

I just ran into this issue, but found the culprit: USAA is expecting \r\n as header delimiters, but the lib is sending just \n.

I'm having issues with USAA as well that appear to be related to header delimiters. The error I'm getting:

OFXAdapter: Failed to parse request:
  Unable to parse an atomic field "OFXRequest.Headers.OFXHeader": unable to find end delimiters

I'm just using the stock commands suggested by the README:

  var bank = Banking({
    fid: 24591
  , fidOrg: 'USAA'
  , url: 'https://service2.usaa.com/ofx/OFXServlet'
  , bankId: 314074269
  , user: 'xxx'
  , password: 'xxx'
  , accId: xxxx
  , accType: 'SAVINGS'
});

bank.getStatement({start:20150101, end:20151001}, function(err, res){
  if(err) console.log(err)
  console.log(res);
});

@euforic @legastero if the problem is that USAA is expecting different header delimiters, how can I use different delimiters? Any help would be appreciated!

@davidlaprade try and modify https://github.com/euforic/banking.js/blob/master/lib/ofx.js#L32-L42 and see if that works. If it does I will test with my banks as well to ensure it does not break other banks and we can then PR it.

commented

@euforic maybe a good way to do this would be to have a 'delimiter' parameter that defaults to '\n' so that it won't break other banks

commented

OK, I opened a pull request with an optional delimiter parameter, does that work for you all? @DanielSchaffer @legastero @davidlaprade ?

@DanielSchaffer @Karissa @legastero I pushed the requested delimiter change to version 1.0.0 and also updated all the dependencies and removed the native module dep. :-) hope that helps

Hey guys, I never ended up using this lib. I've got no opinions on this :)

Hello, just peaking around the interwebs .. \r\n is the header protocol standard: http://stackoverflow.com/questions/5757290/http-header-line-break-style and https://www.w3.org/Protocols/rfc2616/rfc2616-sec2.html#sec2.2

Any sites that accept \n header line endings are doing so from the bottom of their heart and should have broken your lib a long time ago ;)