#lime_google-pay-test-mode-error

1 messages ยท Page 1 of 1 (latest)

languid juniperBOT
#

๐Ÿ‘‹ 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.

fair sundial
#

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?

raven jasper
#

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?

fair sundial
#

hmmmm yeah, this seems pretty normal, it doesn't look like you're doing anything strange

languid juniperBOT
raven jasper
#

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

azure citrus
#

Hello ๐Ÿ‘‹

I'm stepping in as my colleague needs to go. Give me a minute to get caught up

raven jasper
#

hi, sure

azure citrus
#

Can I ask, are you using Expo with your React Native app?

raven jasper
#

yes, and Im using a development build

#

Plugin config:

 [
        "@stripe/stripe-react-native",
        {
          merchantIdentifier: "merchant.com.velar",
          enableGooglePay: true,
        },
      ],
azure citrus
#

Hmmm... I think there have been issues where Expo results in Google Pay not working in dev mode. Let me search for that

azure citrus
#

Did this just start happening? Was Google Pay working before?

raven jasper
#

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

azure citrus
#

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.

raven jasper
#

Ok, Im assuming it only is failing in testing mode then

azure citrus
#

That is what I am gathering.

raven jasper
#

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

azure citrus
#

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.

raven jasper
#

Ok, Ill also write there and check the discord

azure citrus
#

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.

raven jasper
#

I get the same error on my pc through browser

#

So it looks like its not related to expo/mobile

azure citrus
#

Yes I think the Expo issue is a red herring at this point. This appears to be a general issue with Stripe <=> Google communication

raven jasper
#

Do you know if this is a recent happening, or something thats not been working for a while?

azure citrus
#

This was flagged by my colleague overnight (yesterday in Singapore)

#

So it's a recent occurance

raven jasper
#

ok, fingers crossed its fixed soon!

azure citrus
#

Yeah we are in communication with Google about resolving the issue. Hopefully you will hear from us soon ๐Ÿคž