mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2026-04-13 00:00:10 +08:00
Merge commit '2b684fadb179af64ac179e0a878b4ffdec0e85aa'
# Conflicts: # src/@ionic-native/plugins/unvired-cordova-sdk/index.ts
This commit is contained in:
@@ -30,7 +30,7 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
@Plugin({
|
||||
pluginName: 'Alipay',
|
||||
plugin: 'cordova-plugin-gubnoi-alipay',
|
||||
pluginRef: 'Alipay',
|
||||
pluginRef: 'cordova.plugins.alipay',
|
||||
repo: 'https://github.com/jing-zhou/cordova-plugin-alipay',
|
||||
install: 'ionic cordova plugin add cordova-plugin-gubnoi-alipay --variable APP_ID=your_app_id',
|
||||
installVariables: ['APP_ID'],
|
||||
|
||||
@@ -475,6 +475,21 @@ export class Calendar extends IonicNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete an event by id.
|
||||
*
|
||||
* @param {string} [id] The event id
|
||||
* @param {Date} [fromDate] The date where it start deleting from
|
||||
* @return Returns a Promise
|
||||
*/
|
||||
@Cordova()
|
||||
deleteEventById(
|
||||
id: string,
|
||||
fromDate?: Date
|
||||
): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Open the calendar at the specified date.
|
||||
* @param {Date} date The date you want to open the calendar on
|
||||
|
||||
@@ -4,7 +4,7 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
/**
|
||||
* @name Couchbase Lite
|
||||
* @description
|
||||
* Plugin to install Couchbase Lite in your PhoneGap app on iOS or Android
|
||||
* Plugin to install Couchbase Lite in your PhoneGap app on iOS or Android <docs-card href="https://ionicframework.com/integrations/couchbase-lite" ionicon="alert">This Plugin is no longer supported by Couchbase. Please see our Couchbase Lite Integration</docs-card>
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
|
||||
@@ -73,7 +73,11 @@ export class Diagnostic extends IonicNativePlugin {
|
||||
@CordovaProperty()
|
||||
permissionStatus: {
|
||||
GRANTED: string;
|
||||
/**
|
||||
* @deprecated cordova.plugins.diagnostic@5.0.0 uses DENIED_ONCE to unify DENIED* statuses across iOS/Android
|
||||
*/
|
||||
DENIED: string;
|
||||
DENIED_ONCE: string;
|
||||
NOT_REQUESTED: string;
|
||||
DENIED_ALWAYS: string;
|
||||
RESTRICTED: string;
|
||||
|
||||
@@ -343,6 +343,9 @@ export class Firebase extends IonicNativePlugin {
|
||||
* Clear all pending notifications from the drawer
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
@Cordova({
|
||||
platforms: ['Android']
|
||||
})
|
||||
clearAllNotifications(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -761,7 +761,7 @@ export class InAppPurchase2 extends IonicNativePlugin {
|
||||
* @param product {IAPProductOptions}
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
register(product: IAPProductOptions): void {}
|
||||
register(product: IAPProductOptions | IAPProductOptions[]): void {}
|
||||
|
||||
/**
|
||||
*
|
||||
|
||||
@@ -18,7 +18,7 @@ import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
* ...
|
||||
*
|
||||
* this.launchReview.launch()
|
||||
* .then(() => console.log('Successfully launched store app');
|
||||
* .then(() => console.log('Successfully launched store app'));
|
||||
*
|
||||
* if(this.launchReview.isRatingSupported()){
|
||||
* this.launchReview.rating()
|
||||
|
||||
@@ -0,0 +1,192 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
|
||||
export interface SumUpResponse {
|
||||
// Code to identify the message
|
||||
code: number;
|
||||
|
||||
// Message for readable usage
|
||||
message: string;
|
||||
}
|
||||
|
||||
export interface SumUpLoginStatus {
|
||||
// Code, to check if an error occured
|
||||
code: number;
|
||||
|
||||
// Booleand value whether the user is logged in or not
|
||||
isLoggedIn: boolean;
|
||||
}
|
||||
|
||||
export interface SumUpPayment {
|
||||
// Unique transaction code
|
||||
transaction_code: string;
|
||||
|
||||
// Card type -> like MAESTRO
|
||||
card_type: string;
|
||||
|
||||
// Merchant code for identification
|
||||
merchant_code: string;
|
||||
|
||||
// Amount of the payment
|
||||
amount: number;
|
||||
|
||||
// Tip amount -> default 0
|
||||
tip_amount: number;
|
||||
|
||||
// Vat amount -> default 0
|
||||
vat_amount: number;
|
||||
|
||||
// Currency code -> like EUR
|
||||
currency: string;
|
||||
|
||||
// Payment status -> successful or error
|
||||
status: string;
|
||||
|
||||
// Type -> Card or nfc
|
||||
payment_type: string;
|
||||
|
||||
// Entry mode -> Like chip or contactless
|
||||
entry_mode: string;
|
||||
|
||||
// Number of installments -> default 1
|
||||
installments: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* @name SumUp
|
||||
* @description
|
||||
* Plugin to communicate with a SumUp payment terminal
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* import { SumUp } from '@ionic-native/sum-up';
|
||||
*
|
||||
*
|
||||
* constructor(private sumUp: SumUp) { }
|
||||
*
|
||||
* this.sumUp.login("ACCESS_TOKEN")
|
||||
* .then((res: SumUpResponse) => console.log(res))
|
||||
* .catch((error: SumUpResponse) => console.error(error));
|
||||
*
|
||||
* this.sumUp.auth("ACCESS_TOKEN")
|
||||
* .then((res: SumUpResponse) => console.log(res))
|
||||
* .catch((error: SumUpResponse) => console.error(error));
|
||||
*
|
||||
* this.sumUp.getSettings()
|
||||
* .then((res: SumUpResponse) => console.log(res))
|
||||
* .catch((error: SumUpResponse) => console.error(error));
|
||||
*
|
||||
* this.sumUp.logout()
|
||||
* .then((res: SumUpResponse) => console.log(res))
|
||||
* .catch((error: SumUpResponse) => console.error(error));
|
||||
*
|
||||
* this.sumUp.isLoggedIn()
|
||||
* .then((res: SumUpLoginStatus) => console.log(res))
|
||||
* .catch((error: SumUpLoginStatus) => console.error(error));
|
||||
*
|
||||
* this.sumUp.prepare()
|
||||
* .then((res: SumUpResponse) => console.log(res))
|
||||
* .catch((error: SumUpResponse) => console.error(error));
|
||||
*
|
||||
* this.sumUp.closeConnection()
|
||||
* .then((res: SumUpResponse) => console.log(res))
|
||||
* .catch((error: SumUpResponse) => console.error(error));
|
||||
*
|
||||
* this.sumUp.pay(10.0, "EUR")
|
||||
* .then((res: SumUpPayment) => console.log(res))
|
||||
* .catch((error: SumUpPayment) => console.error(error));
|
||||
*
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'SumUp',
|
||||
plugin: 'cordova-sumup-plugin',
|
||||
pluginRef: 'window.SumUp',
|
||||
repo: 'https://github.com/mariusbackes/cordova-plugin-sumup',
|
||||
install:
|
||||
'cordova plugin add cordova-sumup-plugin --variable SUMUP_API_KEY=INSERT_YOUR_KEY',
|
||||
installVariables: ['SUMUP_API_KEY'],
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
@Injectable()
|
||||
export class SumUp extends IonicNativePlugin {
|
||||
/**
|
||||
* Login a user with an optional access token.
|
||||
* If the access token is provided and valid, the user is logged in autmatically.
|
||||
* Otherwise the user has to type in the credentials
|
||||
* @param accessToken {string}
|
||||
* @return {Promise<SumUpResponse>} Return a SumUpResponse object
|
||||
*/
|
||||
@Cordova()
|
||||
login(accessToken?: string): Promise<SumUpResponse> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Authenticates the account with the given access token. Parameter accessToken is required.
|
||||
* @param accessToken {string}
|
||||
* @return {Promise<SumUpResponse>} Return a SumUpResponse object
|
||||
*/
|
||||
@Cordova()
|
||||
auth(accessToken: string): Promise<SumUpResponse> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Opens a new window with the all account settings of an logged in user.
|
||||
* @return {Promise<SumUpResponse>} Return a SumUpResponse object
|
||||
*/
|
||||
@Cordova()
|
||||
getSettings(): Promise<SumUpResponse> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Logout a user from the account.
|
||||
* @return {Promise<SumUpResponse>} Return a SumUpResponse object
|
||||
*/
|
||||
@Cordova()
|
||||
logout(): Promise<SumUpResponse> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks whether the user is logged in or not and returns an object with the field isLoggedIn which is a boolean value.
|
||||
* @return {Promise<SumUpResponse>} Return a SumUpResponse object
|
||||
*/
|
||||
@Cordova()
|
||||
isLoggedIn(): Promise<SumUpLoginStatus> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepares the terminal for a payment. Checks whether the CardReader is ready to transmit and
|
||||
* if an instance of the CardReaderManager is available.
|
||||
* @return {Promise<SumUpResponse>} Return a SumUpResponse object
|
||||
*/
|
||||
@Cordova()
|
||||
prepare(): Promise<SumUpResponse> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Tries to close the connection to the card terminal.
|
||||
* @return {Promise<SumUpResponse>} Return a SumUpResponse object
|
||||
*/
|
||||
@Cordova()
|
||||
closeConnection(): 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}
|
||||
* @return {Promise<SumUpResponse>} Return a SumUpResponse object
|
||||
*/
|
||||
@Cordova()
|
||||
pay(amount: number, currencycode: string): Promise<SumUpPayment> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user