Hey everyone, I have set up the Stripe test payment flow. For that, I have created a page.
I have the import { PaymentsStripe as Stripe } from ‘expo-payments-stripe’ placed in the file header.
In the useEffect declaration, I put
useEffect(() => {
Stripe.setOptionsAsync({
publishableKey: 'pk_test_yadiyadiyada',
androidPayMode: 'test',
merchantId: 'your_merchant_id', // left as is for now
});
}, []);
This works great on Android, but it does not work for me on iOS simulator. undefined is not an object (evaluating 'StripeModule.init')
What am I missing to make it up and running on the iOS simulator?
As for iOS, Apple is very strict on having the payments module included in an app and there has to be a clear and purposeful reason for its inclusion. To include it simply to test/develop the module is not allowed which is why you can not use it on iOS with a Managed project.