You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
print("createCustomerStripe called.")
let customerFromClient = try req.content.decode(CustomersDTO.self)
let httpClient = HTTPClient(eventLoopGroupProvider: .shared(req.eventLoop))
let stripe = StripeClient(httpClient: httpClient, eventLoop: req.eventLoop, apiKey: "test_key")
let newCustomer = stripe.customers.create(email: customerFromClient.email,
name: customerFromClient.name,
phone: customerFromClient.phone)
return newCustomer
}
`
IMPORTANT: Stripe receives each new customer when this func is called. A new customer is created with the data submitted (email, name, phone). Stripe Logs show no errors. However, Vapor crashes. Please help!
The text was updated successfully, but these errors were encountered:
I recommend using the Stripe Vapor package vs Stripe-Kit directly. But essentially you're not hopping to the requests event loop with the stripe client.
I receive the following error in the console:
Assertion failed: file AsyncHTTPClient/HTTPClient.swift, line 117 2021-05-06 16:19:12.537202-0400 Run[9051:882865] Assertion failed: file AsyncHTTPClient/HTTPClient.swift, line 117
when running the following code:
`
func createCustomerStripe(_ req: Request) throws -> EventLoopFuture {
`
IMPORTANT: Stripe receives each new customer when this func is called. A new customer is created with the data submitted (email, name, phone). Stripe Logs show no errors. However, Vapor crashes. Please help!
The text was updated successfully, but these errors were encountered: