#darius3399
1 messages · Page 1 of 1 (latest)
hi! can you share more context? what is inside SmartButtonsCheckout?
<>
<div id="checkout-page">
<div
style={{ display: hideExpress ? "none" : "block" }}
id="express-checkout-element"
>
<ExpressCheckoutElement onConfirm={onConfirm} onReady={onReady} />
{errorMessage && <div>{errorMessage}</div>}
</div>
{(hideExpress || noMethodAvailable) && (
<div>{t("express-checkout.no-available-method")}</div>
)}
</div>
{loading && (
<div
style={{
display: "flex",
justifyContent: "center",
marginTop: "16px"
}}
>
<Jelly size={24} speed={0.9} color="black" />
</div>
)}
</>
and if it's important import {
ExpressCheckoutElement,
useElements,
useStripe
} from "@stripe/react-stripe-js";
@weary marlin
the options need to be passed to the ExpressCheckoutElement not the <Elements provider
<ExpressCheckoutElement options={layout:{....}} ... />
ook, ty
<ExpressCheckoutElement
onConfirm={onConfirm}
onReady={onReady}
options={{ layout: { overflow: "never" } }}
/> added like this
worked, ty
great!
ok I have one more question, you know any method how I could hide buttons on purpose, even they are avalable ?
i know there is wallets for apple pay and google pay with always or never but i need a method for paypal too
there is?
yeah that doesn't exist sorry
it's feedback we're aware of and we've raised internally to the product team to add
(the missing paypal option there)
even tho I would try somehow to hide it forced over the dashboard selections?
like to tell him from code what is available?
no?
well you can pass payment_method_types:["card"] on a PaymentIntent and then Paypal won't be available for the ECE used with that PaymentIntent
or on the dashboard you can create a PaymentMethodConfiguration that excludes Paypal and then pass that configuration ID to a PaymentIntent
https://docs.stripe.com/payments/multiple-payment-method-configs
https://docs.stripe.com/api/payment_intents/create#create_payment_intent-payment_method_configuration
so there's a few options but nothing as easy as passing into options.wallets unfortuantely
better first one I guess
oh but that one with payment methot types is for backend kinda?
or when I create the payment intent you say
right?
its's when you create the PaymentIntent yes, which is on the backend, and is what you're calling in order to get the clientSecret in your code