-
Notifications
You must be signed in to change notification settings - Fork 663
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix spacing for AMEX and Discover cards #4672
Merged
epan-stripe
merged 4 commits into
michelleb/credit-card-compose
from
elena/credit-card-compose-spacing
Mar 11, 2022
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 57 additions & 0 deletions
57
payments-ui-core/src/test/java/com/stripe/android/ui/core/CardNumberFixtures.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
package com.stripe.android.ui.core | ||
|
||
import com.stripe.android.cards.CardNumber | ||
|
||
/** | ||
* See [Basic test card numbers](https://stripe.com/docs/testing#cards) | ||
*/ | ||
internal object CardNumberFixtures { | ||
const val AMEX_NO_SPACES = "378282246310005" | ||
const val AMEX_WITH_SPACES = "3782 822463 10005" | ||
val AMEX_BIN = AMEX_NO_SPACES.take(6) | ||
val AMEX = CardNumber.Unvalidated(AMEX_NO_SPACES) | ||
|
||
const val VISA_NO_SPACES = "4242424242424242" | ||
const val VISA_WITH_SPACES = "4242 4242 4242 4242" | ||
val VISA_BIN = VISA_NO_SPACES.take(6) | ||
val VISA = CardNumber.Unvalidated(VISA_NO_SPACES) | ||
|
||
const val VISA_DEBIT_NO_SPACES = "4000056655665556" | ||
const val VISA_DEBIT_WITH_SPACES = "4000 0566 5566 5556" | ||
val VISA_DEBIT = CardNumber.Unvalidated(VISA_DEBIT_NO_SPACES) | ||
|
||
const val MASTERCARD_NO_SPACES = "5555555555554444" | ||
const val MASTERCARD_WITH_SPACES = "5555 5555 5555 4444" | ||
val MASTERCARD_BIN = MASTERCARD_NO_SPACES.take(6) | ||
val MASTERCARD = CardNumber.Unvalidated(MASTERCARD_NO_SPACES) | ||
|
||
const val DINERS_CLUB_14_NO_SPACES = "36227206271667" | ||
const val DINERS_CLUB_14_WITH_SPACES = "3622 720627 1667" | ||
val DINERS_CLUB_14_BIN = DINERS_CLUB_14_NO_SPACES.take(6) | ||
val DINERS_CLUB_14 = CardNumber.Unvalidated(DINERS_CLUB_14_NO_SPACES) | ||
|
||
const val DINERS_CLUB_16_NO_SPACES = "3056930009020004" | ||
const val DINERS_CLUB_16_WITH_SPACES = "3056 9300 0902 0004" | ||
val DINERS_CLUB_16_BIN = DINERS_CLUB_16_NO_SPACES.take(6) | ||
val DINERS_CLUB_16 = CardNumber.Unvalidated(DINERS_CLUB_16_NO_SPACES) | ||
|
||
const val DISCOVER_NO_SPACES = "6011000990139424" | ||
const val DISCOVER_WITH_SPACES = "6011 0009 9013 9424" | ||
val DISCOVER_BIN = DISCOVER_NO_SPACES.take(6) | ||
val DISCOVER = CardNumber.Unvalidated(DISCOVER_NO_SPACES) | ||
|
||
const val JCB_NO_SPACES = "3566002020360505" | ||
const val JCB_WITH_SPACES = "3566 0020 2036 0505" | ||
val JCB_BIN = JCB_NO_SPACES.take(6) | ||
val JCB = CardNumber.Unvalidated(JCB_NO_SPACES) | ||
|
||
const val UNIONPAY_NO_SPACES = "6200000000000005" | ||
const val UNIONPAY_WITH_SPACES = "6200 0000 0000 0005" | ||
val UNIONPAY_BIN = UNIONPAY_NO_SPACES.take(6) | ||
val UNIONPAY = CardNumber.Unvalidated(UNIONPAY_NO_SPACES) | ||
|
||
const val UNIONPAY_19_NO_SPACES = "6200500000000000004" | ||
const val UNIONPAY_19_WITH_SPACES = "6200 5000 0000 0000 004" | ||
val UNIONPAY_19_BIN = UNIONPAY_19_NO_SPACES.take(6) | ||
val UNIONPAY_19 = CardNumber.Unvalidated(UNIONPAY_19_NO_SPACES) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💯 This is fantastic! Thanks Elena!