#lime_google-pay-test-mode-error
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1479196532468224241
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
hello! had a few questions come in at once but i'll get to this asap
can you share your code for how you're handling this?
I create an intent on server
app.post('/payment-sheet', async (req, res) => {
const customerId = 'cus_U4dwB8KxRVnkOc';
const paymentIntent = await stripe.paymentIntents.create({
customer: customerId,
amount: 1000,
currency: 'eur',
capture_method: 'automatic',
});
res.json({
paymentIntent: paymentIntent.client_secret,
});
});
In the app I call the server to create intent and return the client secret to process it.
const { initPaymentSheet, presentPaymentSheet } = useStripe();
const [loading, setLoading] = useState(false);
const initializePaymentSheet = async () => {
const { clientSecret } = await fetchPaymentSheetParams();
const { error } = await initPaymentSheet({
merchantDisplayName: "Test company",
paymentIntentClientSecret: clientSecret,
// Set `allowsDelayedPaymentMethods` to true if your business can handle payment
//methods that complete payment after a delay, like SEPA Debit and Sofort.
allowsDelayedPaymentMethods: true,
defaultBillingDetails: {
name: "Test company",
},
googlePay: {
testEnv: true,
merchantCountryCode: "FI",
currencyCode: "EUR",
},
applePay: {
merchantCountryCode: "FI",
},
returnURL: "velarmobile:",
});
if (!error) {
setLoading(true);
}
};
const openPaymentSheet = async () => {
const { error } = await presentPaymentSheet();
if (error) {
Alert.alert(`Error code: ${error.code}`, error.message);
} else {
Alert.alert("Success", "Your order is confirmed!");
}
};
return (
<View style={{ flex: 1, justifyContent: "center", alignItems: "center" }}>
<Button mode="contained" onPress={initializePaymentSheet}>
Get sheet
</Button>
<Button mode="contained" disabled={!loading} onPress={openPaymentSheet}>
Checkout
</Button>
</View>
);
};```
I had to enable apple pay api from apple developer dashboard, as even for testing it was required, but it does not seem I need to do anything for Google as far as testing goes if I understood correctly?
hmmmm yeah, this seems pretty normal, it doesn't look like you're doing anything strange
Im using a real device, I even added an actual card to my wallet which does appear on the initial prompt, but it does not let me use the real card as Im passing testEnv: true. I then get a bunch of test cards I can pick from, and they all return the same error
Hello ๐
I'm stepping in as my colleague needs to go. Give me a minute to get caught up
hi, sure
Can I ask, are you using Expo with your React Native app?
yes, and Im using a development build
Plugin config:
[
"@stripe/stripe-react-native",
{
merchantIdentifier: "merchant.com.velar",
enableGooglePay: true,
},
],
Hmmm... I think there have been issues where Expo results in Google Pay not working in dev mode. Let me search for that
ok, thx!
Did this just start happening? Was Google Pay working before?
no, it was never working
Ive been trying to implement it today, I was hoping since apple pay went so smoothly, google pay would not prove to be difficult, if anything I thought it would be simpler as I dont have to configure anything through play store as I had to for apple
Am I missing any steps? I dont have to add any special cards to my wallet in my phone, right? As I get a list of bunch of testing cards to test with
I am asking because it looks like we have an issue that we reported to Google specifically about payment requests failing in Test mode. But I need to read up on that to make sure it applies here.
Ok, Im assuming it only is failing in testing mode then
That is what I am gathering.
Okay, Id appreciate if you can get back to me when you get more info on this, Ill text as well if Im able to solve it somehow
The best way to get a response would be to write in to Support here: https://support.stripe.com/contact
They can ensure you get added to any communications that are sent out about this.
Ok, Ill also write there and check the discord
Yes it appears this is still ongoing. I recommend flagging that you are impacted by this and Support will follow up as we resolve the issue with Google.
I just tried testing https://docs.stripe.com/elements/express-checkout-element
I get the same error on my pc through browser
So it looks like its not related to expo/mobile
Yes I think the Expo issue is a red herring at this point. This appears to be a general issue with Stripe <=> Google communication
Do you know if this is a recent happening, or something thats not been working for a while?
This was flagged by my colleague overnight (yesterday in Singapore)
So it's a recent occurance
ok, fingers crossed its fixed soon!
Yeah we are in communication with Google about resolving the issue. Hopefully you will hear from us soon ๐ค