None of my physical device or emulator/simulator is accepting `isGooglePaySupported`
See original GitHub issueI’ve tried in 3 different android real device and iPhone 11 and none have accepted the support. Is it correct? tested on expo and bare react native CLI
import { StripeProvider, useGooglePay } from "@stripe/stripe-react-native";
function PaymentScreen() {
const { isGooglePaySupported } = useGooglePay();
if (!(await isGooglePaySupported({ testEnv: true }))) {
Alert.alert("Google Pay is not supported.");
return;
const { error } = await initGooglePay({
testEnv: true,
merchantName: "anything",
countryCode: "US",
billingAddressConfig: {
format: "FULL",
isPhoneNumberRequired: true,
isRequired: false,
},
existingPaymentMethodRequired: false,
isEmailRequired: true,
});
if (error) {
console.log(error.code, error.message);
return;
}
}
...
}
function App() {
return (
<StripeProvider publishableKey="pk_test_xxx" ...>
<PaymentScreen />
</StripeProvider>
);
}
If I comment the conditional code the initGooglePay
throws this error
[TypeError: _NativeStripeSdk.default.initGooglePay is not a function. (In '_NativeStripeSdk.default.initGooglePay(params)', '_NativeStripeSdk.default.initGooglePay' is undefined)]
otherwise isApplePaySupported
its ok!
Which phones accept google payment?
Issue Analytics
- State:
- Created a year ago
- Comments:6
Top Results From Across the Web
Fix problems with contactless payments - Google Pay Help
Step 1: Check your contactless payment set up · Under “NFC,” tap Contactless payments and then Payment default. · Make sure "Google Pay"...
Read more >Testing on Emulators vs Simulators vs Real Devices
Testing on mobile devices is key! Read this article to identify the difference between Emulators vs Simulators vs Real Devices.
Read more >updating Google play services in Emulator - android
Try to navigate to settings--> apps in your emulator and then find Google Play Services. Check the version number and use it in...
Read more >What is Google Wallet, and how do you use it? - Pocket-lint
However, to pay in stores using Google Pay, your phone must support NFC (near-field communication) and HCE (host card emulation).
Read more >Google Pay FAQ - Aerospace Federal Credit Union
Google Pay relies on a form of NFC called Host Card Emulation (HCE). This technology does not require access to a secure element...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
We are relying on
stripe-android
’s GooglePayPaymentMethodLauncher and returning the result of that, so I think that either there is missing app setup, or missing device setup for Google Pay.If this only happens in production, it could be that one of these steps is unfinished
@gabrielew I’m going to close this since we’re simply passing this result along, I don’t believe it’s an issue with
stripe-react-native