#qzai.

1 messages · Page 1 of 1 (latest)

wind spireBOT
desert sorrel
#

hi, do you have more context, where exactly are you passing those options?

simple osprey
#

const paymentElementOptions = {
layout: "tabs",
paymentMethodTypes: ['google_pay','apple_pay'], // 支持的支付方式

};

  const paymentElement = elements.create("payment", paymentElementOptions);
  paymentElement.mount("#payment-element");
#

paymentElementOptions

desert sorrel
#

I see. And what is happening that you expect not to happen?

#

the card still exists after I configure it.
I don't quite understand what that means.

#

also 'google_pay','apple_pay' are not possible values for that field, you would get an error, that's not really how it works.

simple osprey
#

card should be hidden

#

What values does paymentMethodTypes accept?

desert sorrel
#

you just want the Element to show Google or Apple Pay, and nothing else, no form to enter a card manually?

simple osprey
#

I want to hide Card

#

only display Google Pay

desert sorrel
#

what will you do if the customer does not have access to Google or Apple Pay, how will they pay you?

simple osprey
#

i have other methods

desert sorrel
#

then I think I would suggest not using the PaymentElement at all here