#thehollytoats_code

1 messages ¡ Page 1 of 1 (latest)

rustic islandBOT
#

👋 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/1364935649546866691

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

patent tapir
#

Hi, let me help you with this.

#

You need to use exactly the same parameters when you set up Payment Element on the frontend.

gusty moss
#

I don't get it. It works well when I don't add 'on_behalf_of' => $connected_account_id parameter

#

in the frontend, java script, this is what is have:
const paymentElementOptions = {
layout: "accordion",
paymentMethodOrder: ['card'],
wallets: {
applePay: "never",
googlePay: "never",
}
};

  const paymentElement = elements.create("payment", paymentElementOptions);
#

and this:
const elements = stripe.elements({
captureMethod: 'manual',
mode: 'payment',
amount: price_to_pay,
currency: p.c,
appearance,
})
const expressCheckoutElement = elements.create(
'expressCheckout',
expressCheckoutOptions
)
expressCheckoutElement.mount('#ece');

patent tapir
#

You need to add the same onBehalfOf parameter to stripe.elements() call.

gusty moss
#

.I'll try. Thank you