#nishp77
1 messages · Page 1 of 1 (latest)
hello! I'll get back to you in a short while
No worries
Hi, we don't have a guide specifically for async/await, but it shouldn't affect how you integrate Stripe. Where do you have difficult with?
Putting aside flow controller and focus on PaymentSheet, it's only the way to fire POST request to your server and adapt to get the secret back in your app
let response = await createPaymentIntent(amount: amount)
Above line tries to get the details in the preparePaymentSheet() however had to make to async as well
DispatchQueue.main.async {
self.paymentSheet = PaymentSheet(paymentIntentClientSecret: paymentIntentClientSecret, configuration: configuration)
}
Throws error: Reference to captured var 'configuration' in concurrently-executing code