stripe-react-native icon indicating copy to clipboard operation
stripe-react-native copied to clipboard

Credit card icon not displaying on Android real devices and some iOS devices

Open kishoreraj87 opened this issue 1 year ago • 3 comments

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 Screenshot 2024-07-01 at 11 44 32 AM

iOS Screenshot 2024-07-01 at 11 44 53 AM

Environment

  • React Native version: [e.g., 0.72.3]
  • Platform: Android, iOS
  • Stripe SDK version: 0.37.3

kishoreraj87 avatar Jul 01 '24 02:07 kishoreraj87

#1690

Mauricio-sy avatar Jul 15 '24 03:07 Mauricio-sy

Zl

Mauricio-sy avatar Jul 20 '24 10:07 Mauricio-sy

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. ImportedPhoto_1727243182902 ImportedPhoto_1727243170578

ThucPT0812 avatar Sep 25 '24 05:09 ThucPT0812

I'm seeing this problem as well

erickreutz avatar Nov 21 '24 18:11 erickreutz

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!

cttsai-stripe avatar Apr 07 '25 18:04 cttsai-stripe

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)

Image

nlasagni avatar Jul 31 '25 10:07 nlasagni