You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Not sure if its a bug, but the onFormComplete is not getting triggered on Android, though its working fine on IOS
To Reproduce
Steps to reproduce the behavior:
Console log the cardDetails in onFormComplete
check the logs in the terminal for ios it will be returning the card details for Android its not even getting triggered
Expected behavior
when card number, expiration date, CVC and postal code have been added, it should trigger the onFormComplete, which is working fine for IOS but not for Android
Screenshots
here is the IOS Screenshot, in which you can see the button has been activated because we are getting the card details
here
is the screenshot for Android
Smartphone (please complete the following information):
I was able to resolve the issue by setting newArchEnabled=false in the gradle.properties file. It appears that the latest version of the Stripe SDK does not fully support the new architecture introduced in React Native.
Describe the bug
Not sure if its a bug, but the
onFormComplete
is not getting triggered onAndroid
, though its working fine onIOS
To Reproduce
Steps to reproduce the behavior:
onFormComplete
Expected behavior
when card number, expiration date, CVC and postal code have been added, it should trigger the onFormComplete, which is working fine for IOS but not for Android
Screenshots
here is the IOS Screenshot, in which you can see the button has been activated because we are getting the card details
here
is the screenshot for Android
Smartphone (please complete the following information):
Additional context
"@stripe/stripe-react-native": "^0.41.0",
"react": "18.3.1",
"react-native": "0.76.5",
I have also changed the styles.xml to support the Material theme which is required for the CardForm to work and not to crash the Android app
<resources> <style name="AppTheme" parent="Theme.Material3.Light.NoActionBar"> <item name="android:editTextBackground">@drawable/rn_edit_text_material</item> <item name="colorPrimary">@color/colorPrimary</item> <item name="colorPrimaryDark">@color/colorPrimaryDark</item> <item name="colorAccent">@color/colorAccent</item> </style> </resources>
build.gradle
`
buildscript {
ext {
buildToolsVersion = "35.0.0"
minSdkVersion = 24
compileSdkVersion = 35
targetSdkVersion = 34
ndkVersion = "26.1.10909125"
kotlinVersion = "1.9.24"
}
repositories {
google()
mavenCentral()
}
dependencies {
classpath("com.android.tools.build:gradle:7.4.0")
classpath("com.facebook.react:react-native-gradle-plugin")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
}
}
apply plugin: "com.facebook.react.rootproject"
`
here is the code
<CardForm style={styles.cardForm} cardStyle={styles.cardStyle(cardError)} placeholders={{ number: 'xxxx xxxx xxxx xxxx', expiration: 'MM/YY', cvc: 'CVC', postalCode: 'Postal Code', }} onFormComplete={cardDetails => { console.log(Platform.OS, 'onFormComplete', cardDetails); setCard(cardDetails); }} />
here are the logs for ios
ios onFormComplete {"brand": "Visa", "complete": true, "country": "PK", "expiryMonth": 4, "expiryYear": 2030, "last4": "4242", "postalCode": "4"}
I'm unable to get any logs for Android, which means the onFormComplete is not even triggered
The text was updated successfully, but these errors were encountered: