#Vipin
1 messages ยท Page 1 of 1 (latest)
Using stripe reader M2
thx
When you say "can't listen to the changes" you mean you just aren't seeing the code run?
Or you see an error?
Or?
Yes I think didChangeConnectionStatus/didChangePaymentStatus is not being triggered. As you can see I use generateLog to log this data but nothing gets logged so thats how I know something is off
In other words the way I know didChangePaymentStatus is not triggered is because I can't log the status I receive from didChangePaymentStatus
Ok thanks!
I've seen a similar open issue for didReportUnexpectedReaderDisconnect not firing https://github.com/stripe/stripe-terminal-ios/issues/193#issuecomment-1337507511
Hello ๐
Hello
How exactly are you testing these methods?
What connection changes are you making?
Im just using these methods to listen to changes in connectionstatus(connected, not connected, connecting) and paymentstatus(notready,ready,waitingforinput,processing) during the checkout process in our app. It is being used to show the user when to swipe the card and when to remove the card(one the payment status changes to processing)
I am not making any changes to the statuses, just want to listen to the changes so I can update my UI accordingly
#1083455388009103430 message . Its a simple test -> Log the status(connectionstatus or paymentstatus) but I don't see anything being logged. However I am able to complete the transaction successfully
Gotcha. Can you share the whole code from this class?
Yes I can so I just paste the code here ?
Yup
Can you try implementing ReaderDisplayDelegate instead? I wonder if BluetoothRaderDelegate might not be enough
https://stripe.dev/stripe-terminal-ios/docs/Protocols/SCPReaderDisplayDelegate.html
These methods in the **TerminalDelegate protocol ** right ? -> didReportUnexpectedReaderDisconnect, didChangeConnectionStatus, didChangePaymentStatus
I can try this thanks for the tip
that's correct but we don't recommend using didChangeConnectionStatus directly for disconnects
https://stripe.dev/stripe-terminal-ios/docs/Protocols/SCPTerminalDelegate.html#/c:objc(pl)SCPTerminalDelegate(im)terminal:didChangePaymentStatus:
but yeah didChangePaymentStatus: shouldn't have any issues as such
I see but in my use case I don't want to monitor the disconnects. I just want to listen to connectionstatus and paymentstatus changes
Gotcha
does your code set Terminal.shared.delegate = self anywhere in the class?
I wonder if the delegate context is getting mixed up somewhere
No actually I don't set this anywhere
ah try setting it in a method which is similar to viewDidLoad in iOS
(sorry don't know a ton about flutter myself)
Trying this now
@compact willow it worked!
Awesome ๐
Awesome I would never be able to figure this out. Thanks so much!