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

bank.getStatement() returning "true"?

TthewJ opened this issue · comments

Hello - I'm very new to javascript, so sorry if this is obvious, but I can't figure out why my code isn't working. I've written a script, to be launched from windows command line via "node myscript.js" (node, npm, and banking are all installed and working). The script runs, but when I get to the bank.getStatement() function, it just returns:
true
Error 500: java.lang.NullPointerException

I'd expected it to return the parsed ofx data to the console ... is that wrong? When I changed the bank info from my checking account to an American Express credit card, it returned "false" instead of true - which makes me think it's at least accessing the bank with the below info?

If anyone can point me in the right direction I'd appreciate it. Thanks.
Here's my code:

console.log('Script is running');

var Banking = require('banking');

var bank = Banking({
fid: 5829,
fidOrg: 'Fifth Third Bancorp',
url: 'https://banking.53.com/ofx/OFXServlet',
bankID: '042000314',
user: 'MY USERNAME',
password: 'MY PASSWORD',
accID: 'MY CHECKING ACCT NUMBER',
accType: 'CHECKING',
ofxVer: 102,
app: 'QWIN',
appver: '1700',
});

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

@TthewJ sounds like an error in the request or a problem with your banks server. You could always inspect the raw request to better debug it.