Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How does ToggleConnectionState get called? #53

Open
lightninglu10 opened this issue Aug 13, 2018 · 1 comment
Open

How does ToggleConnectionState get called? #53

lightninglu10 opened this issue Aug 13, 2018 · 1 comment

Comments

@lightninglu10
Copy link

Hey guys, trying to look through your code to see how you setup a POS system, but running into some stumbling blocks.

How is this line of code called here?

https://github.com/clover/remote-pay-cloud-examples/blob/master/remote-pay-cloud-pos-react/src/utils/CloverConnection.js#L64

Basically trying to see how toggleConnectionState is being called, and it's not really clear.

@RachelAntion
Copy link
Contributor

RachelAntion commented Feb 11, 2019

The method is just being passed through in the CloverConnection.js class, and then it is called in the POSCloverConnectorListener.js in the onDeviceReady method

onDeviceReady(merchantInfo){ // called when the Clover device is ready to communicate
console.log('onDeviceReady', merchantInfo);
this.store.setStoreName(merchantInfo.merchantName);
this.store.setDeviceId(merchantInfo.deviceInfo.serial);
this.toggleConnection(true); <--------- Here
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants