#gasper_gpay-react-native

1 messages ยท Page 1 of 1 (latest)

willow sparrowBOT
#

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

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

finite cobalt
harsh tiger
#

Are you able to log any details/errors in your application when you call initPaymentSheet and the button is tapped?

finite cobalt
#

let me check

#

no nothing

harsh tiger
#

Do you have the ID of a payment that throws that error (pi_xxx)?

finite cobalt
#

you mean payment intent ID?

harsh tiger
#

Yes

finite cobalt
#

just a sec

willow sparrowBOT
finite cobalt
#

seti_1RNw6LJA7Or4kmRAVK54RzXt

#

this is setup intent id

swift lagoon
#

Hi, taking over as my teammate needs to step away. Let me catch up.

finite cobalt
#

tnx!

swift lagoon
finite cobalt
#

apple pay works fine yes

#

when button is pressed we only get An internal error occured nothing else

#

export const initializePaymentSheet = async setupIntent => {
const { error } = await initPaymentSheet({
merchantDisplayName: 'merchant',
customerId: setupIntent.customerId,
setupIntentClientSecret: setupIntent.clientSecret,
returnURL: 'merchant://stripe-redirect',
googlePay: {
merchantCountryCode: rootStore.userStore.user?.serviceCountryData.code,
testEnv: Config.NAME !== 'PRODUCTION',
},
style: 'alwaysLight',
applePay: {
merchantCountryCode: rootStore.userStore.user?.serviceCountryData.code,
},
billingDetailsCollectionConfiguration: {
address: 'never',
phone: 'never',
email: 'never',
name: 'never',
},
appearance: {
primaryButton: {
colors: {
background: Colors.buttonBlue,
},
},
},
primaryButtonLabel: i18next.t('paymentSheet.pay'),
});

return error;
};

#

is there any misconfig in above code?

swift lagoon
#

That seems right. Can you try from a different device?

finite cobalt
#

woll do

willow sparrowBOT
finite cobalt
#

will do*

umbral horizon
#

Hi there ๐Ÿ‘‹ taking over as my teammate needs to step away soon.

Something else I'd be interested in hearing the results of, is what happens if you hardcode the Google Pay values rather than pulling them from variables:

      merchantCountryCode: rootStore.userStore.user?.serviceCountryData.code,
      testEnv: Config.NAME !== 'PRODUCTION',
    },```
willow sparrowBOT
#

gasper_gpay-react-native

finite cobalt
#

let me check

#

we found out

#

The three-letter ISO 4217 alphabetic currency code, e.g. "USD" or "EUR". Required in order to support Google Pay when processing a Setup Intent. */
currencyCode?: string;

#

if we add currencyCode in googlePay it works