#pavittarsingh

1 messages ยท Page 1 of 1 (latest)

radiant pythonBOT
sullen geyser
#

Hi there, can you tell me the question that you want to ask?

ruby canopy
#

Hey Jack

#

I'm trying to use payment request button but I'm facing error
"A payment method of type card was expected to be present, but this PaymentIntent does not have a payment method and none was provided. Try again providing either the payment_method or payment_method_data parameters."

sullen geyser
#

Can you share with me the payment intent ID?

ruby canopy
#

sure

#

would this help?

sullen geyser
#

Thanks. What's the result that you get from pr.canMakePayment() ?

ruby canopy
#

It's give me { applePay:true, googlePay:false }

#

So It shows apple pay button. but when I try to do pr.confirmCardPayment method I'm getting this error
"A payment method of type card was expected to be present, but this PaymentIntent does not have a payment method and none was provided. Try again providing either the payment_method or payment_method_data parameters.e"

sullen geyser
#

Can you do a console.log and see what's inside e.paymentMethod.id ?

ruby canopy
#

sure

#

give me some time

ruby canopy
#

Here you go
paymentMethodId: pm_1LzYyqJ3K2kPnvT1zol4XPy9
https://dashboard.stripe.com/test/payments/pi_3LzYyzJ3K2kPnvT10HtJCvYF
Error message
"message": "A payment method of type card was expected to be present, but this PaymentIntent does not have a payment method and none was provided. Try again providing either the payment_method or payment_method_data parameters."
"type": "invalid_request_error"

crystal finch
#

๐Ÿ‘‹ taking over

#

When you use confirmCardPayment probably you forgot to include the paymentMethod.id? This part

stripe.confirmCardPayment(
    clientSecret,
    {payment_method: ev.paymentMethod.id},
    {handleActions: false}
  ).then(function(confirmResult) {
...
  }
ruby canopy
#

No I'm passing the paymentMethodId in confirmCardPayment method from this method I'm getting the error.

crystal finch
ruby canopy
#

pm_1LzYyqJ3K2kPnvT1zol4XPy9

#

this is the paymentMethodId

crystal finch
#

hmm, ok so you can see it is passed in, logging right before the call?

#

eventhough the request doesn't have it? ๐Ÿค”

crystal finch
#

Hi, I am stepping down for the day. If you are back and still need help, feel free to ask in the channel