#nishp77

1 messages · Page 1 of 1 (latest)

twilit axleBOT
grizzled dew
#

hello! I'll get back to you in a short while

old oar
#

No worries

twilit axleBOT
tiny solstice
#

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

old oar
#

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

tiny solstice
#

That's something specific to Swift and async-await

#

Sorry we are not very familiar with it but I guess you can search for the error as if configuration is any normal int or string in Swift