#squidonomics
1 messages · Page 1 of 1 (latest)
We would need more details to triage. Do you see any error and what does it mean by "no longer works"?
there is no error
the if let paymentSheet = model.paymentSheet now fails to allow card details to be entered
and defaults to the else condition
I have changed nothing and it works on a real device for about 2 hours and then the condition starts to fail
however it always works on the xcode simulator
We can't tell unless you share a bit more about how you are initializing that paymentSheet
probably your real device wasn't able to make the request to backend?
it can make the request. The customer, payment intent and ephermiral key are created on stripe servers and show on stripes account logs
The paymentSheet is verbatim copy and pasted from this to test stripe swiftui integration
it works for a few hours and then nothing
How about putting a breakpoint here to see if you initialized it? https://github.com/stripe/stripe-ios/blob/master/Example/PaymentSheet Example/PaymentSheet Example/PaymentSheet Example/ExampleSwiftUIPaymentSheet.swift#L71-L74
You have access to breakpoints and debugger right?
I can put breakpoints yes
I'll put one at line 71
it's initialized that isn't the issue
and can you see the structure of self.paymentSheet?
I can see usage and parameters but structure is only available in the stripe docs
Can you put breakpoint in L72 instead? and see if self.payment got any value
print returns nothing with that breakpoint unfortunately
Instead of print can you do something like
DispatchQueue.main.async {
let paymentSheet = PaymentSheet(
paymentIntentClientSecret: paymentIntentClientSecret,
configuration: configuration)
self.paymentSheet = paymentSheet // <---- Put a breakpoint here
}
When Xcode stopped at that line, open the debugger and expand the paymentSheet value