#squidonomics

1 messages · Page 1 of 1 (latest)

opal hullBOT
severe stream
#

We would need more details to triage. Do you see any error and what does it mean by "no longer works"?

strange quiver
#

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

severe stream
#

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?

strange quiver
#

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

severe stream
#

You have access to breakpoints and debugger right?

strange quiver
#

I can put breakpoints yes

#

I'll put one at line 71

#

it's initialized that isn't the issue

severe stream
#

and can you see the structure of self.paymentSheet?

strange quiver
#

I can see usage and parameters but structure is only available in the stripe docs

severe stream
#

Can you put breakpoint in L72 instead? and see if self.payment got any value

strange quiver
#

print returns nothing with that breakpoint unfortunately

severe stream
#

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