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

Fixed: Unable to discover M2 Reader #3

Conversation

MichaelCadavillo
Copy link
Contributor

@MichaelCadavillo MichaelCadavillo commented May 20, 2022

Was also encountering some issue when discovering M2 Card Readers.

Going through the code, native code was actually able to discover the M2 Card Reader.
It seems that it was failing when parsing the json to StripeReader object.
When discovering an M2 Card reader, it was not having any originalJSON field which was causing it to fail.

e.g
Sample json object received when an M2 reader is discovered (I've only changed the serial number):
{locationStatus: 2, deviceType: 3, originalJSON: null, serialNumber: <SERIAL_NO>, batteryStatus: 0, locationId: null, simulated: false, availableUpdate: false, label: null}]

Added some null check into the field for it to not cause error.

@awazgyawali
Copy link
Owner

This is already fixed on version 1.2.0. Thank you for your contribution.

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

Successfully merging this pull request may close these issues.

None yet

2 participants