#ludongming_code
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/1315591499152363530
đ 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.
- ludongming_code, 25 minutes ago, 17 messages
- ludongming_code, 4 days ago, 38 messages
Could you share the code of googlePay config in the initPaymentSheet?
The first picture shows me using initPaymentSheet and presentaPaymentSheet to create a payment pop-up, while the second picture shows me using confirmPlatformPayment. So why doesn't the first picture have a Google Pay option?
{
merchantDisplayName: merchantName,
customerId: trialData?.customer,
customerEphemeralKeySecret: trialData?.ephemeralKey,
setupIntentClientSecret: trialData?.setupIntent,
returnURL: 'yigolicarwashintl://stripe-redirect',
paymentMethodTypes: trialData ? ['card', 'googlePay', 'applePay'] : undefined,
googlePay: {
merchantCountryCode: 'US',
currencyCode: 'USD',
testEnv: IS_DEV,
merchantName,
existingPaymentMethodRequired: false,
billingAddressRequired: true,
},
applePay: {
merchantCountryCode: 'US',
currencyCode: 'USD',
}
}
The code here uses Setup Intent whereas the screenshot for PlatformPay used Payment Intent.
Could you set the same Payment Intent client secret and googlePay config for both initPaymentSheet() and confirmPlatformPay() to check whether the behaviours are the same?
I use confirmPlatformPaySetup Intent, which can also be pulled up
This parameter was successfully obtained by the server from you. Using initPaymentSheet with the same parameter will not display Google Pay, but using confirmPlatformPaySetup Intent can
Could you share the code for both initPaymentSheet() and confirmPlatformPaySetup()?
const param = {
merchantDisplayName: merchantName,
customerId: trialData?.customer,
customerEphemeralKeySecret: trialData?.ephemeralKey,
setupIntentClientSecret: trialData?.setupIntent,
returnURL: 'yigolicarwashintl://stripe-redirect',
paymentMethodTypes: ['card', 'googlePay', 'applePay'],
googlePay: {
merchantCountryCode: 'US',
currencyCode: 'USD',
testEnv: IS_DEV,
merchantName,
label: merchantName,
},
applePay: {
merchantCountryCode: 'US',
currencyCode: 'USD',
buttonType: 'short'
}
}
const { error } = await initPaymentSheet(param);
const { error } = await confirmPlatformPaySetupIntent(trialData?.setupIntent, {
googlePay: {
testEnv: IS_DEV,
merchantName: options.label,
merchantCountryCode: 'US',
currencyCode: 'USD',
// billingAddressConfig: {
// format: PlatformPay.BillingAddressFormat.Full,
// isPhoneNumberRequired: true,
// isRequired: true,
// },
},
});
This is indeed strange. Let me check internally and get back to you
what's the SetupIntent ID seti_xxx ?
seti_1QU2zRHiYvn8ZIkeRGuDMGFr_secret_RMmYcrgxyge4NjfqFHVBRkmMIEzG0H6
can you remove paymentMethodTypes from the parameters to initPaymentSheet ?
and have you made the changes to the AndroidManifest described at https://docs.stripe.com/payments/accept-a-payment?platform=react-native#react-native-google-pay ?
I have already configured AndroidManifest.xml
Will the 'setupIntentClientSecret' generated by our server limit the selection of payment methods?
it bases the payment method selection on your settings on https://dashboard.stripe.com/test/settings/payment_methods?config_id=pmc_1OchvyHiYvn8ZIkesybVBvPG
anyway, I have no idea why Google Pay is not appearing here, I'm sorry. My best guess is maybe the PaymentElement can only show one "wallet", and CashApp takes priority to display over the Google Pay wallet.
Is there any other way for my users to choose Google Pay payment?
those are the possible integrations, PaymentSheet and the platformPay components
It's like this, we pull up the payment control to obtain the user's payment method. If I can use ConfirmPlatformPaySetup Intent to pull up a payment pop-up window, and then the user pays 0 yuan, can I also get the user's payment method, so that the server can automatically deduct the payment through this payment method in the future?https://docs.stripe.com/payments/save-and-reuse?platform=react-native&mobile-ui=payment-element#add-google-pay
not sure what you mean. That guide you linked is for processing a payment and saving a card during the payment. If your question is can you pass 0 to the amount on the PaymentIntent, no, you can't.
I am currently collecting payment methods from users to facilitate automatic deduction for future subscriptions. Now calling initPaymentSheet, if users cannot choose Google Pay, it will affect our users'
as I said, I have no idea why Google Pay is not appearing here, I'm sorry. It feels like it should, maybe there's something I'm missing. You could open a support ticket at https://support.stripe.com/?contact=true with a minimal reproduction of your app that exhibits the problem and we could try investigate deeper.
Does the server need to add special parameters when generating the setup IntentClient Secret? For example, payment methods: ['card ',' appePay ',' googlePay ']
no it does not
I already checked the logs on your account and on the backend the SetupIntent seems to support GooglePay. I don't know why the PaymentSheet is not showing it.
like I said my best guess is maybe the PaymentElement can only show one "wallet", and CashApp takes priority to display over the Google Pay wallet. So maybe one thing you can try if you want is to turn off CashApp in your settings (https://dashboard.stripe.com/test/settings/payment_methods?config_id=pmc_1OchvyHiYvn8ZIkesybVBvPG) and see if that changes anything.
If it doesn't, then I'm out of ideas and I'd suggest opening a support ticket.
I see. Then I'm out of ideas and I'd suggest opening a support ticket.
confirmPlatformPaySetupIntent(trialData?.setupIntent, {
googlePay: {
testEnv: IS_DEV,
merchantName: options.label,
merchantCountryCode: 'US',
currencyCode: 'USD',
// billingAddressConfig: {
// format: PlatformPay.BillingAddressFormat.Full,
// isPhoneNumberRequired: true,
// isRequired: true,
// },
},
})
I found that this can pull up Google Pay, but it shows 0 yuan. Does clicking continue also mean that the server has collected the user's payment method
it would confirm the SetupIntent, and if that SetupIntent has a customer set, the PaymentMethod is saved to that customer
So triggering Google Pay to pass the parameter 'amount 0' allows for normal payment
it should be the same, the PaymentElement is also using a SetupIntent, so it's also using amount:0.
which is why I say I don't know why it's not working the same as platformPay, there's no reason I can think of or discover from everthing I've checked unfortunately ( so please open a support ticket if the issue persists so we can try and dig deeper)
So where can I pick up the work order?
Hey! Taking over for my colleague. Let me catch up.
const param = { "applePay": { "merchantCountryCode": "US" }, "customerEphemeralKeySecret": "ek_test_YWNjdF8xT2J3bzJIaVl2bjhaSWtlLDd2Q0Q3ckJUTEd0VEQyc0F3Yk5uV3pmeVlXWmJyS1g_00BeGZcpmo", "customerId": "cus_RMnoEyyQI5icD5", "googlePay": { "currencyCode": "USD", "merchantCountryCode": "US", "testEnv": true }, "merchantDisplayName": "JETX Platform Services", "returnURL": "yigolicarwashintl://stripe-redirect", "setupIntentClientSecret": "seti_1QU4MBHiYvn8ZIkeCA4uTKd1_secret_RMny5edgyc3242LXKCAMvCXXh9J1zu9" }
const { error } = await initPaymentSheet(param);
const { error: error2 } = await presentPaymentSheet();
What you mean here exactly ?
The above is my code, the parameters have not been used yet. You can see why Google Pay does not display them when pulling up the payment control
Do you have a valid card in your Google Wallet ?
his is a control pulled up through confirmPlatformPaySetup Intent
yes
Where are you based ? which country ?
Can you share the SetupIntent used here ?
These codes are
here
Google Pay seems active in your Stripe Dashboard.
Where are you based currently? You are testing from which country?
Can you open this link from your mobile browser (Chrome) and share a screenshot of what you are seeing ?
https://docs.stripe.com/elements/express-checkout-element/accept-a-payment
Yes, I can also pull up the control through ConfirmPlatformPaySetup Intent, but it shows a payment of 0 yuan. What I expect is for the user to choose a payment method such as Apple Pay or Google Pay
China
I can see
Could you please do this test please ? and share a screenshot?
Yes I know. Just I want to make sure that your mobile device meet all the requirements and display Google Pay
I invite you please to open the link I shared above from your mobile browser, the same device you are using to test/run your ReactNative App.
Ok great thanks.
Can you help me create a work order
Now let's move to our official ReactNative example in tegration and try running it on the same device
And see if you sees Google Pay or not ?
Currently, the payment controls pulled up using initPaymentSheet and presentaPaymentSheet only display card and cash app payments without Google Pay and Apple Pay options. However, I can pull up the Google Pay payment control through ConfirmPlatformPayment
I'll give you the code first. Am I getting off work? Looking forward to a good response from you tomorrow
My question is very clear. When I use initPaymentSheet to collect user payment methods, there is no Google Pay in the control, only Card and Cash App. However, when I use ConfirmPlatformPaySetup Intent to pull up Google Pay separately, it can be pulled up normally. But this is not what I want. I want to use initPaymentSheet to pull up the control and let users choose Google Pay. Most importantly, it is written in your document that it is possible.
https://docs.stripe.com/payments/save-and-reuse?platform=react -native&mobile-ui=payment-element#charge-saved-payment-method
Yes I totally understand that, but we are not able to reproduce or underline the root issue here. That's why I'm inviting you to try reproduce the issue on our official project and share with us a reproduction steps.