This forum has been archived. All content is frozen. Please use KDE Discuss instead.

[SOLVED] American Express direct download not working

Tags: None
(comma "," separated)
User avatar
Hei Ku
Registered Member
Posts
784
Karma
3
OS
KMyMoney can use AqBanking. You have to install version aqbanking 3.8.x to make it work. Plus a couple of other packages required by aqbanking.


Hei Ku, proud to be a member of the KMyMoney Development Team since January-2008
User avatar
wolfemi1
Registered Member
Posts
58
Karma
0
OS
I've done a little digging, and it appears that the Innovision corporation handles the direct download backend for both American Express and Discover cards. I think there may be a difference in the authentication used to download from Innovision servers and other servers. I found on their site that this may involve a different form of authentication:

http://www.innovision.com/corporate/New ... 61004.html

That extra form of authentication may explain why these two companies don't work with the ofx download, but other companies do, and why the two companies do work with aqbanking. I'm still trying to find out what could be different, and how to change it (since I'm still a complete noob here :)), but I think that the code in question is located at CVSROOT/kmymoney2/plugins/ofximports/dialogs/konlinebankingsetup.cpp line 274. I'm not sure how to fix it just yet, does anyone know how aqbanking does its account downloads?

Thanks,

-Mike

Edit: I think that path may be wrong, I've noticed that there are duplicates of that file and similar files (one set in the above directory, one set in the CVSROOT/kmymoney2/dialogs directory). I really am not sure what is going on. Anyone know which of these paths is the one actually being used?

Last edited by wolfemi1 on Tue Jan 13, 2009 2:59 am, edited 1 time in total.


wolfemi1, proud to be a member of KDE forums since 2008-Dec.
User avatar
wolfemi1
Registered Member
Posts
58
Karma
0
OS
All,

I exchanged some email with Bill Cary from Innovision (I think Thomas Baumgart beat me there :)), and he had two ideas for possible reasons AMEX might now work:

#1: Some institutions assume the "FI" aggregate (which includes the FID
and ORG) will always be sent and they do validation against it. Note that
this aggregate can optionally be sent by a client, but because some
organizations assume that these are being sent by only be the "major"
third-party "supported" applications (e.g. Intuit or Microsoft) they might
only validate the ones they know about ... and always expect to see them.
Therefore, you may need to consider if and how to send those in your
requests. This FI aggregate, from your perspective, would be roughly
analogous to the client APPID APPVER ... in that you would need to have
valid ones to pass in or you might get blocked by a particular FI's OFX
server.

#2: Another remote (very unlikely reason) possibility could be due to some
of the new MFA features (now available in the newer specification of OFX)
that an FI might choose to optionally implement which changes the OFX
security model a bit. But if this occurs, it would tend to be limited to
just banks and possibly credit unions. It's a remote possibility, but it
could prevent your client-side KMyMoney behavior to stop working if it's not
capable of interacting with MFA-enabled OFX servers.


From this, it seems like the more likely problem could be the FI aggregate mentioned in his item #1. Does anyone know if this field is sent by KMyMoney?

-Mike


wolfemi1, proud to be a member of KDE forums since 2008-Dec.
User avatar
wolfemi1
Registered Member
Posts
58
Karma
0
OS
While searching in my local copy of the code, I searched for some of the tags needed for the OFX transactions, and I found this in the file mymoneyofxconnector.cpp:

Code: Select all
const QByteArray MyMoneyOfxConnector::accountInfoRequest(void) const
{
  OfxFiLogin fi;
  memset(&fi,0,sizeof(OfxFiLogin));
  strncpy(fi.fid,fiid().latin1(),OFX_FID_LENGTH-1);
  strncpy(fi.org,fiorg().latin1(),OFX_ORG_LENGTH-1);
  strncpy(fi.userid,username().latin1(),OFX_USERID_LENGTH-1);
  strncpy(fi.userpass,password().latin1(),OFX_USERPASS_LENGTH-1);

  char* szrequest = libofx_request_accountinfo( &fi );
  QString request = szrequest;
  // remove the trailing zero
  QByteArray result = request.utf8();
  result.truncate(result.size()-1);
  free(szrequest);

  return result;
}


This seems to be how the request is being sent out. There's a large section of code after this that is in a '#if 0' block, which I take to mean it is not currently being compiled. The commented out code looks like an older version of the code, maybe the new version broke it?

Anyway, looking at this code without digging too deep, it looks like the APPID and APPVER are not being sent. I believe that these are both optional fields, and shouldn't have any problems resulting from their lack. However, it sounds like some financial institutions could be lazy with their implementation of the OFX standard, and verify that those optional tags are sent. If that's the case, this could explain why some FIs don't work with this, and it could explain why some of the compatibility was broken after the newer code was used.

Did American Express work before this code was changed?

Thanks,

-Mike


wolfemi1, proud to be a member of KDE forums since 2008-Dec.
User avatar
ipwizard
KDE Developer
Posts
1359
Karma
6
OS
After some digging with wolfemi1 in the details of the encrypted communication way down in the internals of the SSL protocol, we figured out, that AE did not handle requests that used certain options.

In short: it looks like their server does not comply to RFC 4346 "The Transport Layer Security (TLS) Protocol Version 1.1" which causes it to always close the connection when TLSv1.1 is mentioned in the Client Hello packet :-[ Some background information on the connection setup can be found on Wikipedia.

Forcing the transport to use SSLv3 solved the problem for wolfemi1. So I added a switch that forces the usage SSLv3 to the OFX setup wizard.


ipwizard, proud to be a member of the KMyMoney forum since its beginning. :-D
openSuSE Leap 15.4 64bit, KF5
troycarpenter
Registered Member
Posts
29
Karma
0
OS
I can confirm that with the latest CVS load (thanks Clay!) using the SSL3 checkbox does allow me to download transactions from Amex.

Thanks guys!


Bookmarks



Who is online

Registered users: Bing [Bot], claydoh, Evergrowing, Google [Bot], rblackwell