-
Notifications
You must be signed in to change notification settings - Fork 272
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
Recent Version Releases Incompatible with Expo #357
Comments
This comment has been minimized.
This comment has been minimized.
Alright here's the workaround. You can use the Functionality will works, such as WorkaroundYou can add a hidden function MyComponent() {
const hiddenInput = useRef<TextInput>(null);
const dismissKeyboard = () => {
if (hidden.current) {
hiddenInput.current.focus(); // focusing on this hidden input will switch the keyboard to a dismissable one
hiddenInput.current.blur(); // blur will dismiss the keyboard
}
};
return (
<>
<CardField />
<TextInput ref={hiddenInput} style={{ display: 'none' }}/>
</>
)
} You can then use the |
We will need to wait for SDK 42 for these newer versions to become compatible with Expo |
Context
Not sure to put this as feature request or bug, sorry in advance if I mislabeled it.
This happened while I was using version 0.1.4 with Expo SDK 41. This is happens due to the fact that anything higher than version 0.1.1 with expo is incompatible. More details as follows.
Bug Description
I’m trying to save a card payment method using Stripe’s React Native SDK. (To set up future payments.) Here's what I followed: https://stripe.com/docs/payments/save-and-reuse?platform=react-native
Here’s the flow I got:
Now here’s the issue I am facing. This flow allows me to successfully save the payment method on the customer in stripe (I see it in the stripe dashboard). However, the
confirmSetupIntent(...)
returns{ setupIntent: undefined }
. As per the docs, the returned value should be{ error?: undefined; setupIntent: SetupIntent }
on success. While the returned value should be { error: StripeError; setupIntent?: undefined } on error only. Here is the reference to the docs: https://stripe.dev/stripe-react-native/api-reference/modules.html#confirmsetupintentresultHere is a screenshot of the logs. I logged the
client_secret
first, then the result of theconfirmSetupIntent(...)
.Once the logs were printed, the payment method was successfully attached to the customer on the Stripe dashboard, even though the SDK returns
{ setupIntent: undefined }
.To Reproduce
stripe-react-native
SDKExpected behavior
On confirm setup intent, the returned setupIntent should be
Cause
Upon further inspection, I learned that it was because of version incompatibility with expo. Tested with version 0.1.1 and it worked. However, it would be preferable to have recent releases compatible with Expo. For instance, this issue #222 was fixed in version 0.1.3, but since I would have to use version 0.1.1, this would mean that the mentioned issue would not be fixed in my application.
Smartphone
The text was updated successfully, but these errors were encountered: