#ionu_ece-apple-pay-display
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/1372602442226864229
๐ 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.
- ionu_unexpected, 1 day ago, 22 messages
- ionu_best-practices, 3 days ago, 26 messages
Hi ๐
What Stripe Element are you using? Also why would you want to force displaying a button that cannot work?
well normal javascript
await loadStripe(paymentProcessorData.value.stripeKey);
stripeElements = stripeInstance.elements(options)
stripeElements.create('payment', {
layout: {
type: 'tabs',
defaultCollapsed: false,
},
fields: {
billingDetails: 'never',
},
});
stripePayment.mount(stripeElementsEl.value);
these are the options:
appearance : object
capture_method: automatic
currency: usd
mode: payment
I was thinking if there is a way to show that option (apple/google pay) even if the user is not yet loaded in the browser (safari/chrome). So when they try to pay with it, the popup for choosing the card would first make them log in.
stripeElements.create('payment', {
Okay this is called the Payment Element https://docs.stripe.com/payments/payment-element
It helps if you use the specific terms here because that changes what options are available.
With respect to showing Apple Pay, no you cannot configure the Payment Element to display Apple Pay when it is not a viable payment method
No worries!
is there a way with something else than payment element ? just to be sure
If you want to use the Express Checkout Element you can specify you want to display these methods even if they are not supported. You can look at these options here: https://docs.stripe.com/js/elements_object/create_express_checkout_element#express_checkout_element_create-options-paymentMethods-applePay
understood
thank you
one last question. Express Checkout Element i see that has 6 payment methods, but no "normal" card. Is that not available there ?
Correct. The intent of the Express Checkout Element is to provide buttons specific to digital wallets.
One solution could be to use both Express Checkout Element and Payment Element. You can restrict the Payment Element to only show card payment method type or just exclude the digital wallet payment method types
You can turn off digital wallets in the Payment Element using the wallets option
thank you very much
Happy to shed what ๐ก I can ๐