mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-01-19 00:12:53 +08:00
feat(clover-go): add support to pass signature and void payment (#3485)
Added support to pass signature incase the card payment require signature for authorisation Added support to void any payment Removed iOS platform for now as it will be supported in coming releases
This commit is contained in:
parent
d7ccd454fb
commit
26d10ef633
@ -24,6 +24,9 @@ export interface SaleResponse extends Response {
|
||||
cardFirst6?: string;
|
||||
cardLast4?: string;
|
||||
}
|
||||
export interface VoidPaymentResponse extends Response {
|
||||
paymentId?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* @name Clover Go
|
||||
@ -56,6 +59,14 @@ export interface SaleResponse extends Response {
|
||||
* .then((res: any) => console.log(res))
|
||||
* .catch((error: any) => console.error(error));
|
||||
*
|
||||
* this.cloverGo.sign(signInfo)
|
||||
* .then((res: any) => console.log(res))
|
||||
* .catch((error: any) => console.error(error));
|
||||
*
|
||||
* this.cloverGo.voidPayment(paymentInfo)
|
||||
* .then((res: any) => console.log(res))
|
||||
* .catch((error: any) => console.error(error));
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
@ -64,7 +75,7 @@ export interface SaleResponse extends Response {
|
||||
pluginRef: 'clovergo',
|
||||
repo: 'https://github.com/hotwax/cordova-plugin-clovergo',
|
||||
install: 'ionic plugin add cordova-plugin-clovergo',
|
||||
platforms: ['Android', 'iOS'],
|
||||
platforms: ['Android'],
|
||||
})
|
||||
@Injectable()
|
||||
export class CloverGo extends IonicNativePlugin {
|
||||
@ -107,4 +118,27 @@ export class CloverGo extends IonicNativePlugin {
|
||||
sale(saleInfo: object): Promise<SaleResponse> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is used to pass signature as two
|
||||
* dimensional number array that represents points
|
||||
* of signature on screen.
|
||||
* The list is passed as signature in SignInfo object.
|
||||
* @param signInfo {object}
|
||||
* @return {Promise<SaleResponse>}
|
||||
*/
|
||||
@Cordova()
|
||||
sign(signInfo: object): Promise<SaleResponse> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function void any payment done through the device
|
||||
* @param saleInfo {object}
|
||||
* @return {Promise<VoidPaymentResponse>}
|
||||
*/
|
||||
@Cordova()
|
||||
voidPayment(paymentInfo: object): Promise<VoidPaymentResponse> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user