#Vipin

1 messages ยท Page 1 of 1 (latest)

pseudo forgeBOT
eager fiber
#

Hi there

#

Hmm let me take a look

#

Which reader are you using?

main jetty
#

Using stripe reader M2

eager fiber
#

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?

main jetty
#

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

eager fiber
#

Gotcha

#

Let me grab someone more familiar with our iOS Terminal SDK

#

One sec

main jetty
#

Ok thanks!

compact willow
#

Hello ๐Ÿ‘‹

main jetty
#

Hello

compact willow
#

How exactly are you testing these methods?

#

What connection changes are you making?

main jetty
#

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

main jetty
compact willow
#

Gotcha. Can you share the whole code from this class?

main jetty
#

Yes I can so I just paste the code here ?

compact willow
#

Yup

main jetty
compact willow
main jetty
#

These methods in the **TerminalDelegate protocol ** right ? -> didReportUnexpectedReaderDisconnect, didChangeConnectionStatus, didChangePaymentStatus

main jetty
compact willow
#

but yeah didChangePaymentStatus: shouldn't have any issues as such

main jetty
compact willow
#

Gotcha

#

does your code set Terminal.shared.delegate = self anywhere in the class?

#

I wonder if the delegate context is getting mixed up somewhere

main jetty
compact willow
#

ah try setting it in a method which is similar to viewDidLoad in iOS
(sorry don't know a ton about flutter myself)

main jetty
#

@compact willow it worked!

compact willow
#

Awesome ๐Ÿ™‚

main jetty
#

Awesome I would never be able to figure this out. Thanks so much!