#Jane_Zhong

1 messages · Page 1 of 1 (latest)

bleak helmBOT
harsh skiff
#

hi!

I have met this error : {"paymentOption": undefined}
where/when exactly did you get that error? do you have more context on that?

Overall I don't think I'd recommend using customFlow unless you really want to

The webhook didn't go through the payment_intent.succeeded part
I'm not sure what you mean by that, can you elaborate?

static moat
#

Hi karletkko ,yes ,please give me a minutes ,let me collect more information to you .

bleak helmBOT
static moat
#

Hi Karlletkko,I have collected the codes that of my React Native part and bankend using node.js part ,please take a look at it .

harsh skiff
#

sorry but we can't really read a docx file like that. Could you ask your question here directly instead?

static moat
static moat
#

Because maybe is easier for you to read

harsh skiff
#

I see a lot of code in there. What is your actual question?

static moat
#

I would love to remove customFlow is true if it is possible ,because I got the error of :paymentOption undefined .

harsh skiff
#

what guide are you using? I am not familiar with this const {error, paymentOption} = await initPaymentSheet line

static moat
harsh skiff
#

I don't see in that code or project anywhere where it does const {error, paymentOption} = await initPaymentSheet

#

that's not how initPaymentSheet works as far as I know. It doesn't return any payment option like what the user picked. That happens later when you call presentPaymentSheet

static moat
harsh skiff
#

that's for the custom flow, which you don't want to use

static moat
static moat
harsh skiff
#

that's not an error though

#

there is no paymentOption returned from initPaymentSheet, it's normal that it's undefined.

#

what does your code look like now?

static moat
#

From the frontend ,it dosen't show any error .. But It brokes the backend ..

harsh skiff
#

well that's entirely separate

#

let's try to focus on one thing at a time. What do you want to work on fixing right now? The frontend or the backend?

static moat
#

Per now ,I only got this problem when passing through the webhook of payment_intent.succeeded ; so I gusess is backend

harsh skiff
#

so what does your backend code look like?

static moat
#

The backend codes I didn't change it ,it is the same like the document I have send to you

harsh skiff
#

what is line 191 in your app.js?

static moat
#

Could you please make a screen short ?

#

This one ?

harsh skiff
#

is that screenshot what line 191 in your app.js file is?

#

if so : try replacing it with res.status(200).end(); for now.

static moat
#

Yes , the pdf I have sent you a the simplify one ,in order to make you feel easier to read.

harsh skiff
#

the PDF has no line numbers of the actual code, so that doesn't help

#

anyway. Does that change help?

static moat
#

Ok,let me try it .

harsh skiff
#

thanks!

#

I have to run sorry. My colleague can help with follow up questions.

static moat
#

Thank you so much ,and have a nice day . I am going to take a try and give you a feedback .