card-io / card.io-Android-SDK

card.io provides fast, easy credit card scanning in mobile apps
Other
1.99k stars 532 forks source link

Support for more than 16 digits in card number #225

Open niemandkun opened 6 years ago

niemandkun commented 6 years ago

General information

Issue description

May be fixed in newest version, but version 5.4.2 does not properly support bank cards with more than 16 digits in card number.

Case A

  1. Start CardIOActivity to scan card with following code:
        Intent scanIntent = new Intent(activity, CardIOActivity.class);
        scanIntent.putExtra(CardIOActivity.EXTRA_REQUIRE_EXPIRY, true);
        scanIntent.putExtra(CardIOActivity.EXTRA_REQUIRE_CVV, true);
        scanIntent.putExtra(CardIOActivity.EXTRA_REQUIRE_POSTAL_CODE, false);
        startActivityForResult(scanIntent, SCAN_REQUEST_CODE);
  2. Try to scan a bank card with 18 digits.

Expected result:

Actual result:

Case B

  1. Start CardIOActivity to scan card with the same code.
  2. Press keyboard button at the bottom right corner.
  3. In EditText labeled "Card Number" try to enter one of these card numbers that is longer than 16 digits: https://www.paypalobjects.com/en_AU/vhelp/paypalmanager_help/credit_card_numbers.htm.

Expected result:

Actual result: