mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-04-29 14:33:30 +08:00
feat(sumup): add test and setup function (#3950)
* feat(sumup): add setup and test function * feat(sumup): add title as parameter in pay function
This commit is contained in:
parent
f5c5e7d179
commit
7350c630fe
@ -111,7 +111,7 @@ export class SumUpKeys {
|
|||||||
* .then((res: SumUpResponse) => console.log(res))
|
* .then((res: SumUpResponse) => console.log(res))
|
||||||
* .catch((error: SumUpResponse) => console.error(error));
|
* .catch((error: SumUpResponse) => console.error(error));
|
||||||
*
|
*
|
||||||
* this.sumUp.pay(10.0, 'EUR')
|
* this.sumUp.pay(10.0, 'Transaction title', 'EUR')
|
||||||
* .then((res: SumUpPayment) => console.log(res))
|
* .then((res: SumUpPayment) => console.log(res))
|
||||||
* .catch((error: SumUpPayment) => console.error(error));
|
* .catch((error: SumUpPayment) => console.error(error));
|
||||||
*
|
*
|
||||||
@ -203,16 +203,38 @@ export class SumUp extends AwesomeCordovaNativePlugin {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Will setup the SumUP SDK.
|
||||||
|
* This action is required before using other functions.
|
||||||
|
*
|
||||||
|
* @returns {Promise<SumUpResponse>} Return a SumUpResponse object
|
||||||
|
*/
|
||||||
|
@Cordova()
|
||||||
|
setup(): Promise<SumUpResponse> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test the SumUp integration using SDK tests.
|
||||||
|
*
|
||||||
|
* @returns {Promise<SumUpResponse>} Return a SumUpResponse object
|
||||||
|
*/
|
||||||
|
@Cordova()
|
||||||
|
test(): Promise<SumUpResponse> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Opens a native SumUp window to proceed a payment. Parameter amount and currencycode are required.
|
* Opens a native SumUp window to proceed a payment. Parameter amount and currencycode are required.
|
||||||
* If the Payment was successful it returns an SumUpPayment object with information about the payment.
|
* If the Payment was successful it returns an SumUpPayment object with information about the payment.
|
||||||
*
|
*
|
||||||
* @param amount {number}
|
* @param amount {number}
|
||||||
* @param currencycode {string}
|
* @param title {string}
|
||||||
|
* @param currencyCode {string}
|
||||||
* @returns {Promise<SumUpResponse>} Return a SumUpResponse object
|
* @returns {Promise<SumUpResponse>} Return a SumUpResponse object
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
pay(amount: number, currencycode: string): Promise<SumUpPayment> {
|
pay(amount: number, title?: string, currencyCode?: string): Promise<SumUpPayment> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user