const onCardScanComplete = function(
// The user scanned a card
const onCardScanCanceled = function() {
// the user closed the scan modal without scanning a card
const onScanError = function(error) {
// An error occurred during the scan. return true to stop the scan, false to attempt to continue scanning.
const onCannotScan = function() {
// The user tapped the `I can't scan this card` button
function launchCardScan(requiredCardBin, requiredCardLastFour) {
bouncerCardScan.scanCard(
requiredCardBin, // optional
requiredCardLastFour // optional