#reygo_code

1 messages ยท Page 1 of 1 (latest)

errant muralBOT
#

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

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

inland frost
#
    const initializePaymentSheet = useCallback(async () => {
        setLoading(true);
        const { error } = await initPaymentSheet({
            merchantDisplayName: "Bla",
            returnURL: `${host}/stripe-redirect`,
            intentConfiguration: {
                mode: {
                    currencyCode: currencyCode,
                    setupFutureUsage: "OffSession" as FutureUsage,
                },
                confirmHandler: confirmHandler,
            },
            applePay: {
                merchantCountryCode: countryIsoCode || "US",
            },
            googlePay: {
                merchantCountryCode: countryIsoCode || "US",
                testEnv
            },
        });
        if (error) {
            console.tron.log(error);
            handleError(error.message);
        }
        setLoading(false);
    }, [
        confirmHandler,
        countryIsoCode,
        currencyCode,
        handleError,
        host,
        initPaymentSheet,
        testEnv,
    ]);

    const presentPaymentSheetAction = useCallback(async () => {
        await initializePaymentSheet();
        const { error } = await presentPaymentSheet();

        if (error && error.code !== PaymentSheetError.Canceled) {
            console.tron.log(error);
            // PaymentSheet encountered an unrecoverable error. You can display the error to the user, log it, etc.
            handleError(error.message);
        }
    }, [handleError, initializePaymentSheet, presentPaymentSheet]);

heady thorn
#

Hello again

inland frost
#

We do have implementation 'com.stripe:stripe-android:20.15.4'

#

In our app/build.gradle

heady thorn
#

Can you share that file? And what about your AndroidManifest.xml as well?

#

Also are you testing on a simulator or an actual device?

inland frost
#

I'm testing on a real device

heady thorn
#

And do you have a live test card in your wallet or are you using the Google Developer cards?

#

From the device you are testing with

inland frost
#

I have live cards in my wallet

#

Google Pay seems to work on that page

heady thorn
#

Okay good to know.

#

What version of the React Native SDK are you using and can you share the files I mentioned above?

inland frost
#

I can't share the whole manifest since it contains a lot of sensitive info but <meta-data android:name="com.google.android.gms.wallet.api.enabled" android:value="true" /> is there

#

We are on RN 0.76.5

heady thorn
#

Sorry the Stripe RN SDK

inland frost
#

"@stripe/stripe-react-native": "0.41.0",

#

So, latest

#

Unfortunately updating the implementation didn't work

#

This is what's happening

heady thorn
#

Looking/thinking...

inland frost
#

Thanks!

heady thorn
#

Are you using Connect here?

inland frost
#

It's a PaymentSheet

heady thorn
#

I know but you are not a platform, correct?

inland frost
#

Not sure how to answer that tbh

#

Sorry

heady thorn
#

Can you share a PaymentIntent ID that was successful with Card?

inland frost
#

But no we're not using connect

#

Sure

#

We use setup intent

#

Is that fine?

#

seti_1QttVfC5YI2qtT0Nbn3yjqJD

heady thorn
#

Ah

inland frost
#

Because we finalize payments server-side

heady thorn
#

Looking more to see if I can confirm that.

inland frost
#

That would be strange

#

Apple Pay works

heady thorn
#

Yeah I agree it would be strange

#

Ah ah I think you might be missing passing currencyCode within the googlePay hash.

#

I think you need to pass it twice

#

Both in intentConfiguration and in googlePay

#
 googlePay: {
    merchantCountryCode: 'US',
    currencyCode: 'USD', // currency must be specified for setup mode
    testEnv: true, // use test environment
  },
#

Try that

inland frost
#

oh my god...

#

That was it

heady thorn
#

Ugh

inland frost
#

That's "incredible"

heady thorn
#

Why do we not return a legit error

#

๐Ÿ˜ฆ

inland frost
#

-y frustrating

heady thorn
#

Yeah sorry that our error message isn't better there...

inland frost
#

Or change the type checking

heady thorn
#

I'll flag that feedback internally

inland frost
#

It's alright

#

Thanks!

heady thorn
#

๐Ÿ‘