#tiagobastos_curve
1 messages · Page 1 of 1 (latest)
hi! you should try to dump more fields from the NSError ideally so you're not just getting the user-facing part of the error , like in this example
paymentSheet?.present(from: self) { paymentResult in
// MARK: Handle the payment result
switch paymentResult {
case .completed:
print("Your order is confirmed")
case .canceled:
print("Canceled!")
case .failed(let error):
print("Payment failed: \n\(error.localizedDescription)")
let fullError = error as NSError
print(fullError.code)
print(fullError.description)
dump(fullError.userInfo)
}
also worth logging the PaymentIntent IDs pi_xxx when this happens so you can look at Stripe API logs for those as well
thank you very much @dusty rune