#sweetpotato8776
1 messages · Page 1 of 1 (latest)
Google Pay is only supported on Chrome. Please the requirements of Google Pay: https://stripe.com/docs/stripe-js/elements/payment-request-button?client=html#html-js-testing
I wish you saw this video.
Can I connect a Google link in Safari like this?
You said it only works in Chrome browser, but it says Safari is also supported.
Which integration do you plan to use? If you use Express Checkout Element, then yes, Google Pay is supported on Safari
Yes, I tried both methods.
Payment element and Express Checkout Element
Is it okay to do this?
Did you mean Payment element don't support Chrome?
Payment Element only displays Google Pay on the Chrome
For Express Checkout Element, you can set wallet.googlePay to always when creating Express Checkout Element, so that Google Pay will be shown in the browser: https://stripe.com/docs/js/elements_object/create_express_checkout_element#express_checkout_element_create-options-wallets
Is there an example of how to confirm on the server side when paying with the express checkout button (GPay)?
We don't have an example to confirm the PI from the server with Express Checkout Element. I'd recommend checking the guides here and integrating them together:
- Confirm at server (instead of using Payment Element, change to Express Checkout Element): https://stripe.com/docs/payments/finalize-payments-on-the-server
- Express Checkout Element: https://stripe.com/docs/elements/express-checkout-element/accept-a-payment
one more question.
const options = {
mode: 'payment',
amount: totalOrderAmt, //google/app pay 표시용
currency: 'usd',
paymentMethodCreation: 'manual',
// Fully customizable with appearance API.
appearance: {
theme: 'stripe'
},
wallets : {
applePay : 'auto'
,googlePay : 'never'
}
};
elements = stripe.elements(options);
I set Google Pay to never.
However, it is exposed, is this impossible to adjust?
The screenshot you shared is for Payment Element, not Express Checkout Element. To disable Google Pay in Payment Element, it should be set at Payment Element's options, not Elments options: https://stripe.com/docs/js/elements_object/create_payment_element#payment_element_create-options-wallets-googlePay
What are you talking about? Paymentelement also has a wallets object?
allets
object
By default, the Payment Element will display all the payment methods that the underlying Payment Intent was created with.
However, wallets like Apple Pay and Google Pay are not payment methods per the Payment Intent API. They will show when the Payment Intent has the card payment method and the customer is using a supported platform and have an active card in their account. This is the auto behavior, and it is the default for choice for all wallets.
If you do not want to show a given wallet as a payment option, you can set its property in wallets to never.
Hide wallets properties
applePay
'auto' | 'never'
googlePay
'auto' | 'never'
Paymentelement also has a wallets object?
Yes!walletsshould be set at individual Element object, not high-level Elements group. In the case of Payment Element, the wallets should be set under:
const paymentElement = elements.create('payment', options);
Yeah I did that. It's because I didn't show full soure.
const options = {
mode: 'payment',
amount: totalOrderAmt, //google/app pay 표시용
currency: 'usd',
paymentMethodCreation: 'manual',
// Fully customizable with appearance API.
appearance: {
theme: 'stripe'
},
wallets : {
applePay : 'auto'
,googlePay : 'never'
}
};
elements = stripe.elements(options);
const paymentElement = elements.create("payment",
{
paymentMethodOrder: [ 'card','apple_pay', 'google_pay', 'klarna']
, layout: {
type: 'tabs',
}
,fields : { "billingDetails" : 'never'}
}
);
I don't see you setting wallets option in
const paymentElement = elements.create("payment",
{
paymentMethodOrder: [ 'card','apple_pay', 'google_pay', 'klarna']
, layout: {
type: 'tabs',
}
,fields : { "billingDetails" : 'never'}
}
);
It should be set at elements.create("payment", ...) not options
Ah, are the stripe elements option and payment option different?
Yup! They are different
thank you so much!