#qzai.
1 messages · Page 1 of 1 (latest)
hi, do you have more context, where exactly are you passing those options?
const paymentElementOptions = {
layout: "tabs",
paymentMethodTypes: ['google_pay','apple_pay'], // 支持的支付方式
};
const paymentElement = elements.create("payment", paymentElementOptions);
paymentElement.mount("#payment-element");
paymentElementOptions
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.
what does that mean?
you just want the Element to show Google or Apple Pay, and nothing else, no form to enter a card manually?
yes
what will you do if the customer does not have access to Google or Apple Pay, how will they pay you?
i have other methods
then I think I would suggest not using the PaymentElement at all here
use https://stripe.com/docs/elements/express-checkout-element or https://stripe.com/docs/stripe-js/elements/payment-request-button instead, since those are designed for just showing those wallet options and nothing else, so they will work better in your use case.