#.abishek

1 messages · Page 1 of 1 (latest)

shy geodeBOT
restive lynx
#

Hi! Let me help you with this.

#

What info are you looking for, specifically?

pallid shore
#

so, I am trying to show a success message if there is no error on the promise

#

so I am trying to get information from the result object on the else section

#
if (result.error) {
    // Inform the customer that there was an error.
  }
else{
  // Get info from the result object
  // Show success message 
}
restive lynx
#

What information do you want to get?

pallid shore
#

if I can know what the object is returned that would be helpful to know what to show to the customer

  • payment_method
  • id
  • amount
    etc..
restive lynx
#

Can you print the result object?

pallid shore
#

it redirects to the return url specified, I don't want it to redirect to the return url unless the payment requires it

restive lynx
#

And then you can inspect the result object yourself.

pallid shore
#

ok, i did that, but that doesn't provide info on what payment method was used to pay

#

how do I get that?

#

do I have to make a API call to get that?

restive lynx
pallid shore
#

what I retrieve on the result of confirmPayment is the same as retrieve_payment_intent

#

both objects don't have what payment method was used

restive lynx
#

Are you looking for a payment method type or Payment Method object ID?

#

Why do you need it on the frontend?

pallid shore
#

to show what payment method was used to make a payment

restive lynx
pallid shore
#

ok