#ms.wang_26902

1 messages · Page 1 of 1 (latest)

slender laurelBOT
#

Hello! We'll be with you shortly. 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.

pseudo tulip
#

You mean remove Google Pay from payment element?

willow quarry
#

Yes, we only want to display the card number information part below. I will use other methods to access Google Pay.

slender laurelBOT
willow quarry
#

OK, thanks

#

const options = {
mode: 'payment',
amount,
currency: currencyCode.toLocaleLowerCase(),
terms: {
googlepay: 'never',
applePay: 'never',
paypal: 'never'
},
appearance: {
theme: 'stripe',
type: 'accordion'
}
};

  // Set up Stripe.js and Elements to use in checkout form
  const elements = stripe.elements(options);
#

What I wrote like this is useless. Google Pay is still there.

buoyant tendon
#

the link that i've pointed you to references the wallet parameter

#

i don't see you defining wallet in what you've pasted

willow quarry
#

So, can I disable Google Pay?

buoyant tendon
#

yes, you can disable Google Pay

willow quarry
#

Is it necessary to define the wallet and can it be disabled? Then how to define the wallet?

buoyant tendon
#

are you a developer?

willow quarry
#

Yes

#

I'm a front-end developer

buoyant tendon
#

that link i shared shows you what parameters can be passed into options. To disable Google Pay, you need to have a wallets object in options with googlepay: 'never'

willow quarry
#

How to set wallet object

buoyant tendon
#

can you share the code snippet where you've created the Payment Element?

willow quarry
buoyant tendon
#
const paymentElement = elements.create('payment',{
  wallets : {
...
  }
});