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

Cancelling recognition after first side of card is scanned. #23

Open
pavikrishna opened this issue Sep 12, 2023 · 2 comments
Open

Cancelling recognition after first side of card is scanned. #23

pavikrishna opened this issue Sep 12, 2023 · 2 comments

Comments

@pavikrishna
Copy link

pavikrishna commented Sep 12, 2023

We only require user to scan the first of the card. Therefore upon successful scan of the first side, we cancelRecognition.

     onFirstSideResult: () => {
        videoRecognizer?.cancelRecognition();
      },

It is working as expected but was wondering if there is any downsides of doing this? Is there any other alternative solutions to the above? I see that this was a recommend solution on a previous post https://help.microblink.com/s/direct-article?Article=ka08W000000st3HQAQ. However this solution has drawbacks since it dose not work for all card types. I'm curious as to why the above link is the recommended solution vs just cancelRecognition.

@pavikrishna
Copy link
Author

also the example in the docs is currently broken
https://codepen.io/microblink/pen/YzpWGMw

@AngTim
Copy link

AngTim commented Sep 12, 2023

Hello Krishna,

Thank you for the inquiry.
There are no downsides in the cancelRecognition event that you have implemented onFirstSideResult function if you wish only to scan the first side of the credit card. Unfortunately, there are not a lot of other solutions for single side scanning with the BlinkCard SDK since it does not include two separate recognizers which you can call depending on your use case SingleSideRecognizer and MultiSideRecognizer and only contains BlinkCardRecognizer which requires both sides of a document by default and that is why the help article suggests a workaround that could be easy to implement and understand for a first hand.
We are aware that it is no the most applicable approach and that is why we have made the following disclaimer:

It is important to note that this setup works only on a specific set of credit cards, like the example above, which only contains the CVV information on the back of the document.
To skip other credit cards with document fields organized differently, the recognizer settings would have to be updated, and maybe some other fields (extractIban, extractExpiryDate or extractOwner) skipped as well. Therefore the solution is not flexible and reproducible in many cases but works well in a specific situation on the same set of credit cards.

The issue with the codepen example has been raised to our engineers and should be resolved soon.
Please feel free to reach out if you have any additional questions or issues.

Kind regards,
Angelo
Web Support Specialist

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