#jacky_code
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/1290960074889629739
đ 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.
- jacky_api, 4 days ago, 10 messages
hi! what component is the PaymentForm? Is it using <PaymentElement> ?
Can I only display the apple pay/ google pay option in the payment form.
well the PaymentElement shows multiple payment methods, like Google/Apple Pay/local payment methods/bank debits, and a credit card form.
If you want something that is just a button for Google/Apple Pay, that is what https://stripe.com/docs/elements/express-checkout-element is for; but note that you still need a credit card form because not everyone will have those wallets active and you need them to be able to pay. So that's why it's easier to use PaymentElement first.
Yes Im using PaymentElement, I will try to follow the https://stripe.com/docs/elements/express-checkout-element first , thank you . I do have an credit card form
Hey, taking over here. Let me know if there's any follow-up Qs I can answer!
Sure.
Let say I stick with the PaymentElement , can I set the default tab as apple pay or google pay
With PaymentElement, you can order your PaymentMethod:
https://docs.stripe.com/js/elements_object/create_payment_element#payment_element_create-options-paymentMethodOrder
Thanks! Feels like this should be a better approach for my current situation
But wait, I'm not sure you can order Apple/Google Pay, as they are card wallets..
Oh , Let me try that real quick.
Sadly it doesn't work ,as apple / google pay inculded in card options. I guess I need to use the Express Checkout Element. But will it be more complicated using setup intent or it just same as the checkout payment intent
You can use Express Checkout Element with setup mode if you want to just save a PaymentMethod:
https://docs.stripe.com/elements/express-checkout-element/accept-a-payment#:~:text=Then%2C create an,configurable Elements options.
Ok, I will follow this guide but that for tmr work. Thx for the help for now
Happy to help!
NVM it acutally work, but somehow the page take longer to load
return (
<form onSubmit={handleSubmit}>
<PaymentElement
options={{
paymentMethodOrder: ["apple_pay", "card"],
}}
/>
<Button type="submit" className={classes.submitButton}>
Submit
</Button>
</form>
);
};
This acutally can order the paymentmethod
Ah great, I had a doubt at the beginning. Great to hear that this worked