liberapay / liberapay.com

Source code of the recurrent donations platform Liberapay
https://liberapay.com/
1.67k stars 214 forks source link

Other payment card brands #673

Closed Changaco closed 6 years ago

Changaco commented 7 years ago

We currently only support CB/Visa/MasterCard, but MangoPay also has two other international brands: Maestro and Diners Club.

Changaco commented 7 years ago

This is a bit complicated because:

rohitpaulk commented 7 years ago

MangoPay doesn't detect the card type automatically, we either have to guess it ourselves or ask the user to select it

https://github.com/braintree/credit-card-type might help

Changaco commented 7 years ago

@rohitpaulk I've already looked at that module and several others. I've even built a new one based on what we already had and bits of others. However guessing the card's primary brand doesn't really tell us which "card type" we should send to MangoPay, because card issuers often make deals allowing their cards to be processed through another network.

In fact the only effective solution may be to try another possible "card type" when we get a "PSP error", until there are no more to try.

Changaco commented 7 years ago
select timestamp::date, amount, note from exchanges where note like '009%' order by id;
 timestamp  | amount |             note             
------------+--------+------------------------------
 2016-05-08 |  20.00 | 009199: PSP technical error
 2016-05-08 |  15.00 | 009199: PSP technical error
 2016-05-13 |  65.00 | 009199: PSP technical error
 2016-05-13 |  65.00 | 009199: PSP technical error
 2016-05-13 |  65.00 | 009199: PSP technical error
 2016-05-27 |  15.00 | 009199: PSP technical error
 2016-06-10 |  15.00 | 009199: PSP technical error
 2016-09-21 |  15.00 | 009199: PSP technical error
 2017-04-04 |  15.00 | 009199: PSP technical error
 2017-04-04 |  15.00 | 009199: PSP technical error
 2017-04-04 |  15.00 | 009199: PSP technical error
 2017-04-06 |  30.16 | 009199: PSP technical error
 2017-06-06 | 150.02 | 009499: Bank technical error
 2017-06-28 | 150.02 | 009499: Bank technical error
 2017-07-09 |  15.00 | 009199: PSP technical error
 2017-07-17 |  15.00 | 009199: PSP technical error
 2017-07-19 |  15.00 | 009499: Bank technical error
 2017-07-31 | 150.00 | 009199: PSP technical error
 2017-08-08 |  15.00 | 009199: PSP technical error
 2017-08-23 |  90.09 | 009499: Bank technical error
 2017-08-23 |  90.09 | 009499: Bank technical error
 2017-08-25 |  92.32 | 009499: Bank technical error
(22 rows)
Changaco commented 7 years ago

At least one person seems to have given up and closed their account when the payment failed.

mikemhenry commented 6 years ago

Maybe just using the first 6 digits to warn users that their card isn't supported would be a good enough stop gap. That way if someone uses say a Discover card, they would get a warning that discover isn't supported. It can just be a warning and if a user hits proceed they can still get the PSP error but at least they have a hint why.

Changaco commented 6 years ago

Closing as obsolete since we no longer process payments through Mangopay.

aaronraimist commented 5 years ago

Should I open a new issue if I want the ability to use a Discover Card (US) or is that probably not possible?

Changaco commented 5 years ago

@aaronraimist See #1354.