#mecha-chocobo_webhooks

1 messages ยท Page 1 of 1 (latest)

scarlet wharfBOT
#

๐Ÿ‘‹ 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/1236022399041015959

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

clever pier
#

However, in your case you will still run into an error if you pass --override checkout_session:mode=setup because the fixture includes line_items

#

It might be easier to copy the JSON file I shared and change the parameters yourself to pass mode: 'setup' and remove the line_items

teal coral
#

so do I need to use --edit to remove the other parts of the fixture and just pass the session with mode:setup?

clever pier
#

Let's test it out, I'm trying now

#

Need to remove the payment_intent_data as well

teal coral
#

trying it now

clever pier
#

That gets pretty tedious! I would recommend creating your own fixture file

teal coral
#

sure, I just wanted to try it so I know what the file needs to have in it

cinder lanceBOT
clever pier
#

Makes sense

teal coral
#

just to make sure, you're saying to create a fixture like { "_meta":{ "template_version": 0 }, "fixtures": [ { "name": "checkout_session", ...other data } ] }

#

cutting out the product, price, payment_page, and payment_page_confirm blocks?

clever pier
#

I would create custom names that don't overlap existing ones

#

Then you can load the fixture file into the CLI and call them directly

teal coral
#

ah, I see

clever pier
#

BTW I've been using more --remove and --add flags but I keep hitting other parameters that need to be changed. It's a frustrating experience

#

I need to step away but my colleague @radiant ferry can assist if you run into more problems

teal coral
#

ok, I also have to take care of something else, but I'll ping in here if I run into any issues with this

teal coral
#

is there any documentation around the params for sessions? I have it to the point where it triggers and creates a setup intent, but doesn't actually kick off an event for the session completion

radiant ferry
#

What do you mean

teal coral
#

I've made a fixure like ```{
"name":"checkout_session_setup",
"path": "v1/checkout/sessions",
"method": "post",
"params": {
"mode": "setup",
...more bits
}
}

and calling that will trigger an event that makes a setup intent
#

but I need to test the .completed event. It's unclear how I actually do that part

teal coral
#

the payment_page_confirm part? So I'll need the payment_page and payment_method parts too, yeah?

radiant ferry
#

yeah exactly

#

Those are dependencies for completing the session

teal coral
#

I see, ok

#

thanks

teal coral
#

took a little bit of fiddling, but I think I have this working now. Thanks