refactor(CardIO):
This commit is contained in:
parent
8e91f2128f
commit
ff9b500938
@ -1,4 +1,4 @@
|
||||
import {Plugin, Cordova} from './plugin';
|
||||
import { Cordova, Plugin } from './plugin';
|
||||
|
||||
/**
|
||||
* @name CardIO
|
||||
@ -25,49 +25,49 @@ import {Plugin, Cordova} from './plugin';
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
plugin: 'https://github.com/card-io/card.io-Cordova-Plugin',
|
||||
pluginRef: 'CardIO',
|
||||
repo: 'https://github.com/card-io/card.io-Cordova-Plugin',
|
||||
platforms: ['iOS', 'Android']
|
||||
plugin: 'https://github.com/card-io/card.io-Cordova-Plugin',
|
||||
pluginRef: 'CardIO',
|
||||
repo: 'https://github.com/card-io/card.io-Cordova-Plugin',
|
||||
platforms: ['iOS', 'Android']
|
||||
})
|
||||
export class CardIO {
|
||||
/**
|
||||
* Check whether card scanning is currently available. (May vary by
|
||||
* device, OS version, network connectivity, etc.)
|
||||
*
|
||||
*/
|
||||
@Cordova()
|
||||
static canScan(): Promise<boolean> {return; }
|
||||
/**
|
||||
* Check whether card scanning is currently available. (May vary by
|
||||
* device, OS version, network connectivity, etc.)
|
||||
*
|
||||
*/
|
||||
@Cordova()
|
||||
static canScan(): Promise<boolean> { return; }
|
||||
|
||||
/**
|
||||
* Scan a credit card with card.io.
|
||||
* @param options
|
||||
*/
|
||||
@Cordova()
|
||||
static scan(options?: CardIOOptions): Promise<any> {return; }
|
||||
/**
|
||||
* Scan a credit card with card.io.
|
||||
* @param options
|
||||
*/
|
||||
@Cordova()
|
||||
static scan(options?: CardIOOptions): Promise<any> { return; }
|
||||
|
||||
/**
|
||||
* Retrieve the version of the card.io library. Useful when contacting support.
|
||||
*/
|
||||
@Cordova()
|
||||
static version(): Promise<string> {return; }
|
||||
/**
|
||||
* Retrieve the version of the card.io library. Useful when contacting support.
|
||||
*/
|
||||
@Cordova()
|
||||
static version(): Promise<string> { return; }
|
||||
}
|
||||
|
||||
export interface CardIOOptions {
|
||||
requireExpiry?: boolean;
|
||||
requireCCV?: boolean;
|
||||
requirePostalCode?: boolean;
|
||||
supressManual?: boolean;
|
||||
restrictPostalCodeToNumericOnly?: boolean;
|
||||
keepApplicationTheme?: boolean;
|
||||
requireCardholderName?: boolean;
|
||||
scanInstructions?: string;
|
||||
noCamera?: boolean;
|
||||
scanExpiry?: boolean;
|
||||
languageOrLocale?: string;
|
||||
guideColor?: string;
|
||||
supressConfirmation?: boolean;
|
||||
hideCardIOLogo?: boolean;
|
||||
useCardIOLogo?: boolean;
|
||||
supressScan?: boolean;
|
||||
}
|
||||
requireExpiry?: boolean;
|
||||
requireCCV?: boolean;
|
||||
requirePostalCode?: boolean;
|
||||
supressManual?: boolean;
|
||||
restrictPostalCodeToNumericOnly?: boolean;
|
||||
keepApplicationTheme?: boolean;
|
||||
requireCardholderName?: boolean;
|
||||
scanInstructions?: string;
|
||||
noCamera?: boolean;
|
||||
scanExpiry?: boolean;
|
||||
languageOrLocale?: string;
|
||||
guideColor?: string;
|
||||
supressConfirmation?: boolean;
|
||||
hideCardIOLogo?: boolean;
|
||||
useCardIOLogo?: boolean;
|
||||
supressScan?: boolean;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user