Modify scan, success, and failure functions for use with BarcodeScanner plugin