#darius3399

1 messages · Page 1 of 1 (latest)

brittle nicheBOT
weary marlin
#

hi! can you share more context? what is inside SmartButtonsCheckout?

distant ferry
#

<>
<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

weary marlin
#

the options need to be passed to the ExpressCheckoutElement not the <Elements provider

#

<ExpressCheckoutElement options={layout:{....}} ... />

distant ferry
#

ook, ty

#

<ExpressCheckoutElement
onConfirm={onConfirm}
onReady={onReady}
options={{ layout: { overflow: "never" } }}
/> added like this

#

worked, ty

weary marlin
#

great!

distant ferry
#

ok I have one more question, you know any method how I could hide buttons on purpose, even they are avalable ?

distant ferry
#

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?

weary marlin
#

it's feedback we're aware of and we've raised internally to the product team to add

#

(the missing paypal option there)

distant ferry
#

even tho I would try somehow to hide it forced over the dashboard selections?

#

like to tell him from code what is available?

#

no?

weary marlin
#

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

#

so there's a few options but nothing as easy as passing into options.wallets unfortuantely

distant ferry
#

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?

weary marlin
#

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