#krsacme

1 messages ยท Page 1 of 1 (latest)

queen yewBOT
steel haven
#

๐Ÿ‘‹ happy to help

#

are you using PaymentElement in a Webview in an iOS app?

exotic pier
#

it is on web

steel haven
#

does this also happen on Safari?

#

I mean on a mac?

exotic pier
#

We don't see ApplePay option in mac - both chrome and safari. Only GoolePay shows up and it worked fine.

#

We are seeing ApplePay in iphone browser - both chrome and safari same behavior

steel haven
#

you shouldn't be seing ApplePay on Chrome

#

that's expected

#

would you mind sharing a link to your test mode website?

exotic pier
#

yeah.

#

once this is loaded, you need to select Lantana Place

#

And once moved to next page, select Smile More

#

then our checkout window will open. fill basic details and then click Continue to Pay

#

then PaymentElement will open up

steel haven
#

I can see the apple pay on Safari on mac

exotic pier
#

Ohh...

#

here, if we click Pay buttong, it throws error

steel haven
#

would you mind sharing your code please?

exotic pier
#

yes, do you see the error?

steel haven
#

taking a look

#

I don't see handleSubmit function code since you're passing it as a prop

exotic pier
#

let me get that..

#

give me few mins, i will share it.

#
    dispatch({
      type: DRAWER_STATE_UPDATED,
      payload: {
        drawerState: 'checkout_stripe_payment',
        props: {
          setStripeSetupIntent: false,
          values,
          handleSubmit: () => setInvokeSubmit(true),
        },
      },
    });
steel haven
#

taking a look

#
useEffect(() => {
    invokeSubmit && handleSubmit();
  }, [invokeSubmit]);
#

this is the reason

#

the handleSubmit should be called by your click button event and not based on the react useEffect hook

exotic pier
#

ok. pass it as props is not a problem, but it should be invoked in the same context - correct?

steel haven
#

yes in the same event handler

#

so instead of handleSubmit: () => setInvokeSubmit(true), you should just pass handleSubmit

exotic pier
#

ok. we will make the modifications and try it. Thanks.

steel haven
#

let me know if you need any more help

exotic pier
#

sure. will be be around for another hour?

#

i asking the team to make the changes