vkeepe / card.io

Scan Credit Card Number - iOS & Android Cordova plugin
Other
32 stars 23 forks source link

Fix sendFailureTo using wrong CDVCommandStatus #4

Closed jimmyhsu closed 7 years ago

jimmyhsu commented 8 years ago

I had noticed that the cancel button and any subsequent error wasn't correctly firing the call on the JS front end, and was occasionally hitting some errors that seemed to only exist if the scan completed successfully.

It appears that the sendFailureTo function was giving CDVCommandStatus_OK when it should have been giving CDVCommandStatus_ERROR.

Thanks for keeping this plugin up to date, great to see the community active and hopefully this will save a few hairs from being pulled out.

ceasyc commented 8 years ago

Any Idea what code needs to be changed to fix this problem in android. When the cancel button is clicked, it is not calling the callback function.

jimmyhsu commented 7 years ago

@ceasyc I'm a year late here and I haven't looked at the android side of things, but if the issue is still present then it could be just a mirror of a similar issue.