capacitor-plugin-scanbot-sdk
Version:
Scanbot Document and Barcode Scanner SDK for Capacitor
18 lines • 789 B
JavaScript
import { CreditCardScannerUiResult, CreditCardScanningResult, handleImageInput, mapRTUUIResult, withSBErrorHandling, } from '../types';
import { ScanbotSDKPlugin } from './Definitions';
/**
* @internal
* @hidden
*/
export const ScanbotCreditCardImpl = {
async scanFromImage(params) {
return withSBErrorHandling(async () => new CreditCardScanningResult(await ScanbotSDKPlugin.scanCreditCardFromImage({
configuration: params.configuration,
image: handleImageInput(params.image),
})));
},
async startScanner(configuration) {
return withSBErrorHandling(async () => mapRTUUIResult(await ScanbotSDKPlugin.startCreditCardScanner(configuration), CreditCardScannerUiResult));
},
};
//# sourceMappingURL=CreditCardScannerImpl.js.map