Skip to content

Commit

Permalink
Support Meastro Cards Beginning in 5043 (#105)
Browse files Browse the repository at this point in the history
* Add support for Meastro cards beginning in 5043.

Signed-off-by: Steven Shropshire <steven.shropshire@getbraintree.com>

* Update CHANGELOG.

Signed-off-by: Steven Shropshire <steven.shropshire@getbraintree.com>

* Add support for 493698 Maestro cards as well.

Signed-off-by: Steven Shropshire <steven.shropshire@getbraintree.com>

* Update CHANGELOG.

Signed-off-by: Steven Shropshire <steven.shropshire@getbraintree.com>

* Add tests for newly supported Maestro cards.

Signed-off-by: Steven Shropshire <steven.shropshire@getbraintree.com>

* Revert support for 49358 Maestro cards until we come up with a cross platform solution for supporting additional Maestro and Elo cards.

* Update CHANGELOG.md

Co-authored-by: sestevens <51723734+sestevens@users.noreply.github.com>

Co-authored-by: Sarah Koop <skoop@paypal.com>
Co-authored-by: Steven <sshropshire@paypal.com>
Co-authored-by: sestevens <51723734+sestevens@users.noreply.github.com>
  • Loading branch information
4 people authored Feb 8, 2021
1 parent 950d5b4 commit 29b3652
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## unreleased
* Bump `compileSdkVersion` and `targetSdkVersion` to API level 30
* Add support for Maestro cards beginning in 5043

## 5.0.0

Expand Down Expand Up @@ -197,4 +198,3 @@
## 1.3.0

* Initial release

Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public enum CardType {
R.drawable.bt_ic_jcb,
16, 16,
3, R.string.bt_cvv, null),
MAESTRO("^(5018|5020|5038|5[6-9]|6020|6304|6703|6759|676[1-3])\\d*",
MAESTRO("^(5018|5020|5038|5043|5[6-9]|6020|6304|6703|6759|676[1-3])\\d*",
R.drawable.bt_ic_maestro,
12, 19,
3, R.string.bt_cvc,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ public class CardTypeTest {
SAMPLE_CARDS.put("5800000000000000008", CardType.MAESTRO);
SAMPLE_CARDS.put("590000000000", CardType.MAESTRO);
SAMPLE_CARDS.put("5900000000000000006", CardType.MAESTRO);
SAMPLE_CARDS.put("5043111111111111", CardType.MAESTRO);

// Union Pay
SAMPLE_CARDS.put("6240888888888885", CardType.UNIONPAY);
Expand Down

0 comments on commit 29b3652

Please sign in to comment.