#rangermillze_api

1 messages ¡ Page 1 of 1 (latest)

bleak hareBOT
#

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

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

normal flower
#

If the button(s) aren't rendering at all, then there is likely an error in your browser console?

bleak hareBOT
neat rapids
#

i'm confused, I have already created a subscription

#

with php

normal flower
#

Well, that's fine too. You can create it pre button click but that just means that any updates your customers makes in the checkout flow, like applying a discount, won't be applied. Which is why we recommended it's done after the payment

neat rapids
#

i thought I had to create the subscription to get the clientsecret?

#

do i create a new subscription if the user pays in paypal?

normal flower
#

Yep, and the client secret is only used inside the same confirm handler where you call confirmPayment

neat rapids
#

Do i just send the total amount for the subscription and the currency?

#

it doesnt make sense because I see mode: subscription, mode: setup and mode: payment. Im unsure what to use here for my options. The documents only have mode: payment

#

is the paypal ece just creating a payment intent?

normal flower
#

You'd pass mode: 'subscription' yes

neat rapids
#

ok, so i just pass mode: amount: and currency?

#

do i pass the client id? because I have already created a client at this point or obtained the client secret

#

ah, i see some information i havent seen before in the doc you sent. i'll have a play and see if I can get it working. thanks.

hot marlin
#

hi! I'm taking over this thread.

neat rapids
#

Hi Soma

hot marlin
#

great! let me know if you have any other questions.

neat rapids
#

sure, i have the setup I need working in that I can pull up the payment element and when someone presses paypal I create the paypal EXE elemenet and hide the checkout button.

#

at this point the paypal button is the ECE mounted one.

#

Does this seem right? I am basically stopping the original Paypal flow and switching the checkout to use the ECE. Once the ECE is complete I dont need to post the form anymore?

hot marlin
#

i have the setup I need working in that I can pull up the payment element and when someone presses paypal I create the paypal EXE elemenet and hide the checkout button.
that seems like a complicated flow. why not simply walways display the Express Checkout Element above the Payment Element? which means the "paypal" option in the Payment Element will disapear.

neat rapids
#

ah so i show both buttons?

#

i'll try that

#

on the paypal side, should I set captureMethod and setupFutureUsage when using mode subscription?

hot marlin
#

ah so i show both buttons?
you show the Express Checkout Element on top, and just below the full Payment Element. then users choose between the two. this is a common pattern