Credit card icon not displaying on Android real devices and some iOS devices
Describe the bug
The credit card icon for Stripe payment is not displaying in our React Native app. We are using @stripe/stripe-react-native version 0.37.3. The base64 string received for the icon is blank.
{
"isChecked": true,
"onPress": [Function anonymous],
"onSheetPress": [Function anonymous],
"stripePaymentOption": {
"image": "iVBORw0KGgoAAAANSUhEUgAAAJ4AAABxCAYAAAAklxosAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAE4SURBVHic7dIxAQAgDMAwwL/n4YIeJAp6dM/MLHjs1AH8yXgkjEfCeCSMR8J4JIxHwngkjEfCeCSMR8J4JIxHwngkjEfCeCSMR8J4JIxHwngkjEfCeCSMR8J4JIxHwngkjEfCeCSMR8J4JIxHwngkjEfCeCSMR8J4JIxHwngkjEfCeCSMR8J4JIxHwngkjEfCeCSMR8J4JIxHwngkjEfCeCSMR8J4JIxHwngkjEfCeCSMR8J4JIxHwngkjEfCeCSMR8J4JIxHwngkjEfCeCSMR8J4JIxHwngkjEfCeCSMR8J4JIxHwngkjEfCeCSMR8J4JIxHwngkjEfCeCSMR8J4JIxHwngkjEfCeCSMR8J4JIxHwngkjEfCeCSMR8J4JIxHwngkjEfCeCSMR8J4JIxHwngkjEfCeCSMR8J4JIxHwngkjEfCeCSMR8J4JIxHwngkjEfCeCSMR8J4JIxHwngkjEfCeCSMR8J4JIxHwngkjEfCeCSMR8J4JIxHwngkjEfCeCSMR8J4JIxHwngkjEfCeCSMR8J4JIxHwngkjEfCeCSMR8J4JIxHwngkjEfCeCSMR8J4JIxHwngkjEfCeCQu8aME3qOapfYAAAAASUVORK5CYII=",
"label": "····4242"
}
}
Expected behavior
The credit card icon should display properly across all devices (both Android and iOS).
Screenshots
Android
iOS
Environment
- React Native version: [e.g., 0.72.3]
- Platform: Android, iOS
-
Stripe SDK version:
0.37.3
#1690
Zl
I am experiencing a similar issue on an Android device, where the credit card brand icon does not display when presenting the credit card input form. However, the icon appears after entering two numbers. Is this a library issue, and should I wait for the latest update, or is there a way to handle this issue? Thank you.
I'm seeing this problem as well
Apologies for the delay, we had a fix on Android and please upgrade your sdk version to see if it works. https://github.com/stripe/stripe-android/issues/8625#issuecomment-2278846959
The React Native SDK soft matches on version 20.48 so it will automatically be applied on the most recent version (0.38.4).
If the problem persists, we are encouraging all users to migrate to the Mobile Payment Element, which we launched in 2021. You can find the docs here. If there are any reasons the MPE doesn't support your use case, we'd love to hear your feedback!
Hi @cttsai-stripe
Update here: still encountering the same issue. Is this issue going to be fixed? We currently can't move to the Payment Sheet in our project as it does not fully match our use case of just asking credit cards info and using the SetupIntent.
One more info: it seems that forcing Appearance.setColorScheme("light"); makes the icon appear again, so it could be an issue with colors/theming.
Stripe SDK version: 0.50.1 RN version: 0.80.1
Device: Google Pixel 8 Pro (Android 16)