#kodai_82300

1 messages · Page 1 of 1 (latest)

cyan hawkBOT
native hazel
#

Hello! You can't get it in that code. When you call stripe.confirmPayment and no error is encountered immediately it will redirect, which means none of the code following that will run.

#

What are you trying to build? Why do you want the Payment Method ID?

sullen cloak
native hazel
#

You can retrieve that information on your server and display it when they load the page you want that info shown on.

sullen cloak
native hazel
#

That is server-side code.

#

Your client-side code would call /retrieve-customer-payment-method on your server, which would cause that server-side code to run and return the Payment Method.

sullen cloak
native hazel
#

What happens when you try this code paired with the server-side code above?

sullen cloak
native hazel
#

What do you mean? Can you show me the client-side code that's not running as expected? That's your server-side code.

#

Wait... do you mean the server-side console.log call shown above isn't running?

#

Are you looking at the logs on your server for that?

sullen cloak
native hazel
#

Okay, can you share your client-side code?

sullen cloak
#

On the client side, I enter the same code as in the documentation.

native hazel
#

Okay, where is retrieveCustomerPaymentMethod being called from?

cyan hawkBOT
sullen cloak
supple monolith
#

Hi, stepping in and catching up.

sullen cloak
#

Do I need to save customer.id etc. when registering a customer?

supple monolith
#

On your server side code, it looks like you're sending paymentMethod, can you console log this on your server code to see what is being logged?