Closed shaileshe2logy closed 1 year ago
Hi @shaileshe2logy
Thanks for reaching out. In looking at your code, it looks like you are attempting to use this integration for paying (not setting up a payment method):
case .completed:
debugPrint("Payment complete")
case .canceled:
debugPrint("Payment canceled")
However, I'm seeing that you are using:
PaymentSheet.FlowController.create(setupIntentClientSecret:...)
Perhaps you have created a payment intent, and have passed the payment intent client secret to this function rather than a setup Intent client secret?
Payment Intent client secrets have a pattern of: "^pi_[^_]+_secret_[^_]+$"
where, SetupIntent client secrets have a pattern of: ^seti_[^_]+_secret_[^_]+$
Can you verify which you are trying to use? PaymentIntent or SetupIntent?
Closing as it appears this may have been resolved with the above comment from the 👍!
Summary
-- Getting below error while running PaymentSheet.FlowController.create and We have confirmed that the client secret is correct. -- The same client secret is working fine with the payment sheet. (Reference)
Code to reproduce
` func setUpStripePayment(merchantName: String?,publishableKey:String?, clientSecret:String?) {
iOS version
iOS Version: 16.3
Installation method
SDK version
StripeApplePay (23.6.1):
Other information