#tallmanpapi
1 messages · Page 1 of 1 (latest)
Hi! Let me help you with this.
What do you mean by "not working" exactly?
Also, this is not really a Stripe-related question.
Oh, you're right actually..
Wait let me transform it in to a more Stripe related question.
So how does it normally work to call a function with the switch case made by Stripe? If you know what I mean.
Stripe shows us a switch case to use, but how would they expect us to make us of it?
@keen reef
You don't have to use switch. You can check the value of body.type in any way you prefer, if you need to.
Okay, but when we want to check for 'payment_method.succeeded' for example, they tell us to use a switch case right?
Do they expect us to pass in here, like what is allowed? I am trying to understand this so I know what I can do with it, you know what I mean.
It doesn't matter, it's just what the person that was creating the example code decided to use, but it's irrelevant to Stripe.
Are you a JavaScript engineer?
No.
Thank you though. I don't think you can help me with my out-of-scope question. Have a nice day.
No worries, you too!