Page MenuHomePhabricator

Store and update list of currently working iDEAL banks
Closed, DeclinedPublic4 Estimated Story Points

Description

There is an API call we can make to find out, but it costs money, so do it as little as possible and store in memcache or something.

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
DStrine lowered the priority of this task from High to Medium.Mar 3 2016, 9:10 PM

from an email with ingenico:

Dear all,

Thank you for your e-mail.

Kindly be advised that we do support the Bunq bank. Please find below the result of the GET_DIRECTORY response for iDeal which lists all the supported banks:

<XML>

<REQUEST>

<ACTION>GET_DIRECTORY</ACTION>

<META>

<MERCHANTID>6570</MERCHANTID>

<IPADDRESS>10.171.99.170</IPADDRESS>

<VERSION>2.0</VERSION>

<REQUESTIPADDRESS>127.0.0.2</REQUESTIPADDRESS>

</META>

<PARAMS>

<GENERAL>

<PAYMENTPRODUCTID>809</PAYMENTPRODUCTID>

<COUNTRYCODE>NL</COUNTRYCODE>

<CURRENCYCODE>EUR</CURRENCYCODE>

</GENERAL>

</PARAMS>

<RESPONSE>

<RESULT>OK</RESULT>

<META>

<RESPONSEDATETIME>20160321111815</RESPONSEDATETIME>

<REQUESTID>rOPUP4595092c29d4</REQUESTID>

</META>

<ROW>

<ISSUERID>ABNANL2A</ISSUERID>

<ISSUERNAME>ABN Amro</ISSUERNAME>

<ISSUERLIST>Short</ISSUERLIST>

<COUNTRYNAMES>Nederland</COUNTRYNAMES>

</ROW>

<ROW>

<ISSUERID>ASNBNL21</ISSUERID>

<ISSUERNAME>ASN Bank</ISSUERNAME>

<ISSUERLIST>Short</ISSUERLIST>

<COUNTRYNAMES>Nederland</COUNTRYNAMES>

</ROW>

<ROW>

<ISSUERID>FRBKNL2L</ISSUERID>

<ISSUERNAME>Friesland Bank</ISSUERNAME>

<ISSUERLIST>Short</ISSUERLIST>

<COUNTRYNAMES>Nederland</COUNTRYNAMES>

</ROW>

<ROW>

<ISSUERID>INGBNL2A</ISSUERID>

<ISSUERNAME>ING</ISSUERNAME>

<ISSUERLIST>Short</ISSUERLIST>

<COUNTRYNAMES>Nederland</COUNTRYNAMES>

</ROW>

<ROW>

<ISSUERID>KNABNL2H</ISSUERID>

<ISSUERNAME>Knab</ISSUERNAME>

<ISSUERLIST>Short</ISSUERLIST>

<COUNTRYNAMES>Nederland</COUNTRYNAMES>

</ROW>

<ROW>

<ISSUERID>RABONL2U</ISSUERID>

<ISSUERNAME>Rabobank</ISSUERNAME>

<ISSUERLIST>Short</ISSUERLIST>

<COUNTRYNAMES>Nederland</COUNTRYNAMES>

</ROW>

<ROW>

<ISSUERID>RBRBNL21</ISSUERID>

<ISSUERNAME>RegioBank</ISSUERNAME>

<ISSUERLIST>Short</ISSUERLIST>

<COUNTRYNAMES>Nederland</COUNTRYNAMES>

</ROW>

<ROW>

<ISSUERID>SNSBNL2A</ISSUERID>

<ISSUERNAME>SNS Bank</ISSUERNAME>

<ISSUERLIST>Short</ISSUERLIST>

<COUNTRYNAMES>Nederland</COUNTRYNAMES>

</ROW>

<ROW>

<ISSUERID>TRIONL2U</ISSUERID>

<ISSUERNAME>Triodos Bank</ISSUERNAME>

<ISSUERLIST>Short</ISSUERLIST>

<COUNTRYNAMES>Nederland</COUNTRYNAMES>

</ROW>

<ROW>

<ISSUERID>FVLBNL22</ISSUERID>

<ISSUERNAME>Van Lanschot Bankiers</ISSUERNAME>

<ISSUERLIST>Short</ISSUERLIST>

<COUNTRYNAMES>Nederland</COUNTRYNAMES>

</ROW>

<ROW>

<ISSUERID>BUNQNL2A</ISSUERID>

<ISSUERNAME>bunq</ISSUERNAME>

<ISSUERLIST>Short</ISSUERLIST>

<COUNTRYNAMES>Nederland</COUNTRYNAMES>

</ROW>

</RESPONSE>

</REQUEST>

</XML>

Should you have any additional questions, please let us know.

With Kind Regards,
Esmee Kerklaan
Merchant Services

@awight and I talked. it may actually be easier to track which banks are not available because they will return an error message.

Change 333155 had a related patch set uploaded (by Ejegg):
WIP add Ingenico bank payment provider

https://gerrit.wikimedia.org/r/333155

Working on a way to do this that pushes more payment code into SmashPig. However, it's using a component that needs PHP 5.4.

@Jgreen what's your timeline for updating the Civi box?

Also, fr-tech, should we be trying to keep SmashPig working on PHP 5.3 for the sake of getting other users? We'd need to replace the Ingenico SDK with our own code (probably signatures will be most annoying), but that might make it easier to keep logging and low-level http stuff the same across gateways.

I'm not sure yet whether we're replacing the hardware or upgrading the
existing machine. Either way Ubuntu Precise is EOL 4/2017 so that's our
drop-dead date for OS and PHP upgrade.

Change 333154 had a related patch set uploaded (by Ejegg):
WIP base class for Ingenico payments without SDK

https://gerrit.wikimedia.org/r/333154

Change 334733 had a related patch set uploaded (by Ejegg):
WIP Look up iDEAL banks without Ingenico SDK

https://gerrit.wikimedia.org/r/334733

Change 336333 had a related patch set uploaded (by Ejegg):
WIP look up iDEAL banks, cache in Memcache

https://gerrit.wikimedia.org/r/336333

Change 337419 had a related patch set uploaded (by Ejegg):
Cache bank lookups via PSR-6

https://gerrit.wikimedia.org/r/337419

Change 337420 had a related patch set uploaded (by Ejegg):
WIP look up iDEAL banks, provide PSR6 to SmashPig

https://gerrit.wikimedia.org/r/337420

Change 333154 merged by Ejegg:
Base class for Ingenico payments without SDK

https://gerrit.wikimedia.org/r/333154

Change 334733 merged by Ejegg:
Look up iDEAL banks without Ingenico SDK

https://gerrit.wikimedia.org/r/334733

Change 337419 merged by Ejegg:
Cache bank lookups via PSR-6

https://gerrit.wikimedia.org/r/337419

Change 338277 had a related patch set uploaded (by Ejegg):
Use dependency injection to get BankPaymentProvider

https://gerrit.wikimedia.org/r/338277

Change 338277 abandoned by Ejegg:
Use dependency injection to get BankPaymentProvider

Reason:
doing this differently, with a PaymentProvider factory method

https://gerrit.wikimedia.org/r/338277

Change 336333 abandoned by Ejegg:
WIP look up iDEAL banks, cache in Memcache

Reason:
Pushing caching down into SmashPig via PSR-6 interface

https://gerrit.wikimedia.org/r/336333

Change 337420 merged by jenkins-bot:
Look up iDEAL banks, provide PSR6 to SmashPig

https://gerrit.wikimedia.org/r/337420

Change 333155 abandoned by Ejegg:
WIP add Ingenico bank payment provider

https://gerrit.wikimedia.org/r/333155

Change 339107 had a related patch set uploaded (by Ejegg):
Fixes for iDEAL/PSR-6 caching

https://gerrit.wikimedia.org/r/339107

Change 339107 merged by jenkins-bot:
Fixes for iDEAL/PSR-6 caching

https://gerrit.wikimedia.org/r/339107

awight renamed this task from Store and update list of currenly working IDEAL banks to Store and update list of currenly working iDEAL banks.Feb 22 2017, 7:04 PM

Change 339331 had a related patch set uploaded (by Ejegg):
Ingenico API decodes JSON, throws exception on errors

https://gerrit.wikimedia.org/r/339331

Code is about ready (last patch adds some error handling). Just emailed Ingenico to get some production credentials for Connect.

Change 339331 merged by jenkins-bot:
Ingenico API decodes JSON, throws exception on errors

https://gerrit.wikimedia.org/r/339331

Change 339489 had a related patch set uploaded (by Ejegg):
Update SmashPig library

https://gerrit.wikimedia.org/r/339489

Change 339330 had a related patch set uploaded (by Ejegg):
Use HashBag instead of EmptyBag

https://gerrit.wikimedia.org/r/339330

Change 339489 merged by jenkins-bot:
Update SmashPig library

https://gerrit.wikimedia.org/r/339489

Change 339330 merged by jenkins-bot:
[mediawiki/extensions/DonationInterface] Use HashBag instead of EmptyBag

https://gerrit.wikimedia.org/r/339330

DStrine renamed this task from Store and update list of currenly working iDEAL banks to Store and update list of currently working iDEAL banks.Mar 6 2017, 3:24 PM

This is deployed. (I can tell because the bank hidden by T131181 is now shown). Trying to verify that it is being cached. T132372 would be a nice next step in case none of the banks are available.

Seems to be caching longer than expected (default was 5 minutes, and I don't see the API call repeated in the logs when I reload 15 minutes later). Digging in...

The caching thing is really stumping me.

I was able to replicate the 'caching too long' locally with CACHE_MEMCACHED only. CACHE_DB was expiring correctly. I could even replicate the problem telnetting in to memcache - it would expire keys on time if I gave it a number of seconds, but not if I gave it a unix timestamp.

Then I restarted memcached with -vv in the conf file and the problem went away. It expired correctly via telnet and via the MemCachedBagOStuff. Restarting again without the -vv, it STILL respected expiration timestamps.

Change 342266 had a related patch set uploaded (by Ejegg):
[wikimedia/fundraising/SmashPig] Work around Memcache not expiring some things

https://gerrit.wikimedia.org/r/342266

@DStrine @Ejegg Any estimate for when this will be done? We're planning to launch Netherlands campaign on Tuesday, but could delay by a few days if needed to get this out.

If someone can review this workaround Monday, we should be able to deploy it the same day.

Change 342266 merged by jenkins-bot:
[wikimedia/fundraising/SmashPig] Work around Memcache not expiring some things

https://gerrit.wikimedia.org/r/342266

Change 345696 had a related patch set uploaded (by Ejegg):
[wikimedia/fundraising/SmashPig@master] Break out unofficial iDEAL status lookup

https://gerrit.wikimedia.org/r/345696

Change 345696 merged by jenkins-bot:
[wikimedia/fundraising/SmashPig@master] Break out unofficial iDEAL status lookup

https://gerrit.wikimedia.org/r/345696

Change 350895 had a related patch set uploaded (by Ejegg; owner: Ejegg):
[mediawiki/extensions/DonationInterface@master] Tweak smashpig initialiazation order

https://gerrit.wikimedia.org/r/350895

This is actually unhelpful 'cause we're contractually not allowed to change the list

Change 350895 abandoned by Ejegg:
Tweak smashpig initialiazation order

Reason:
New split config will make this obsolete

https://gerrit.wikimedia.org/r/350895

@Ejegg: Hi, all related patches in Gerrit have been merged or abandoned. Is there more to do in this task? Asking as you are set as task assignee. Thanks in advance!
(You can change the task status via Add Action...Change Status in the dropdown menu.)

Turns out we're not able to do anything with the data even if we maintain a current copy of it locally.