#viethoang-ReactNative
1 messages · Page 1 of 1 (latest)
i use npm stripe-react-native. when i use initStripe or warp my code with StripeProvider then have error
Hi @hexed otter Let me take a look
Are you using both initStripe and StripeProvider ?
No, I am. I just use initStripe or StripeProvider
OK, can you double check if the publishableKey that you passed to initStripe and make sure its value is valid?
this publishableKey work in stripe for web
Do you fetch the publishableKey from your server, or is the key hardcoded in your React Native app?
I hardcoded the publishableKey value
Ok. can you send me the full code?
this my code, excluding the real publishablekey
It seems like the NativeStripeSdk is resolved to null.
Can you try rebuild the whole and project?
Also send me the package.json file
this is the package json
Can you try the following
- Clear the
node_modulesandpackage-lock.jsonoryarn,lockfile and build the application again - If above doesn't work, upgrade the
react-nativeto a newer version (e.g., stripe-react-native is using 0.68.1 https://github.com/stripe/stripe-react-native/blob/master/package.json#L73) and build the application.