#Asp-apple_pay

1 messages · Page 1 of 1 (latest)

covert crown
#

Hi @steel sparrow! Could you share with me the PaymentIntent ID (pi_xxx)?

steel sparrow
#

pi_3K4NF8HGEu8wlVR00Y2JAkPD_secret_YOmWA61btqhC8gxppMGl5riiZ

#

Payment intent id not recived for only i sent client secret to confirm payment intent

#

STPPaymentHandler.shared().confirmPayment(withParams: paymentIntentParams, authenticationContext: self as! STPAuthenticationContext)

#

@covert crown

covert crown
#

Your PaymentIntent was created with confirm: true. It means it will be confirmed automatically, so you don't need to confirm it on the frontend.
That's why you are getting an error message saying "You cannot confirm this PaymentIntent because it has already succeeded after being previously confirmed"

#

When you create the PayemntIntent, you can check the Stripe response that should contain status: "succeeded".

steel sparrow
#

How i confirm to front end side i change front endside anything? in swift ios

covert crown
#

When you create the PaymentIntent with confirm: true, it is automatically confirmed. So there's nothing to do on the frontend on iOS. The payment is already successful.

steel sparrow
#

how will change it confirm: true or confirm: false in. backend

covert crown
#

If you set confirm: false (that's the default value) when creating the PaymentIntent, then you need to confirm the payment on the frontend.

steel sparrow
#

Okay thank you so much i will check it @covert crown

steel sparrow
#

Changed confirm : false but got this error

#

@covert crown

#

return URL also given

tepid dawn
#

You'll need to pass the return_url during client-side confirmation

steel sparrow
#

I gave return_url but only got same error

#

@tepid dawn

#

I passed returnurl as same error coming

tepid dawn
#

Can you share the actual error? Or the request ID?

steel sparrow
#

error Optional(Error Domain=com.stripe.lib Code=50 "There was an unexpected error -- try again in a few seconds" UserInfo={com.stripe.lib:StripeErrorTypeKey=invalid_request_error, com.stripe.lib:ErrorMessageKey=You cannot confirm this PaymentIntent because it has already succeeded after being previously confirmed., NSLocalizedDescription=There was an unexpected error -- try again in a few seconds, com.stripe.lib:StripeErrorCodeKey=payment_intent_unexpected_state})

tepid dawn
#

You're trying to confirm a Payment Intent that has already been confirmed. You need to create a new PI object

steel sparrow
#

This error came that time i changed confirm : false in backend side

steel sparrow
#

This PaymentIntent pi_3K4QB..... cannot be confirmed using your publishable key because its confirmation_method is set to manual. Please use your secret key instead, or create a PaymentIntent with confirmation_method set to automatic

#

I found this error

fallow river
#

👋 hopping in since @tepid dawn and @covert crown had to head out