mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-03-04 00:13:06 +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))
|
||||
* .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))
|
||||
* .catch((error: SumUpPayment) => console.error(error));
|
||||
*
|
||||
@ -203,16 +203,38 @@ export class SumUp extends AwesomeCordovaNativePlugin {
|
||||
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.
|
||||
* If the Payment was successful it returns an SumUpPayment object with information about the payment.
|
||||
*
|
||||
* @param amount {number}
|
||||
* @param currencycode {string}
|
||||
* @param title {string}
|
||||
* @param currencyCode {string}
|
||||
* @returns {Promise<SumUpResponse>} Return a SumUpResponse object
|
||||
*/
|
||||
@Cordova()
|
||||
pay(amount: number, currencycode: string): Promise<SumUpPayment> {
|
||||
pay(amount: number, title?: string, currencyCode?: string): Promise<SumUpPayment> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user