diff --git a/README.md b/README.md index 6e22847..2c97b05 100644 --- a/README.md +++ b/README.md @@ -6,10 +6,12 @@ Add the plugin: cordova plugin add https://github.com/storepilot/cordova-plugin-sumup # Usage -Importing the plugin (note, the plugin does NOT use global variables): +Importing the plugin OR use the global variables `import * as SumUp from 'cordova-plugin-sumup';` +`window.SumUp OR SumUp` + ## Authenticating ### Login to SumUp @@ -75,5 +77,9 @@ interface SumUpPayment { Opens the settings page. +`SumUp.isloggedin(): Promise` + +Checks if User has already logged into SumUp (iOS ONLY) + # FINAL NOTES This is forked from https://github.com/nuvoPoint/cordova-plugin-sumup and edited to allow programmable apikey diff --git a/plugin.xml b/plugin.xml index f9b1050..5afc5e4 100644 --- a/plugin.xml +++ b/plugin.xml @@ -45,6 +45,9 @@ The app needs to connect to Bluetooth peripherals to detect the SumUp Card Terminal correctly. Please confirm with OK as you cannot use your card reader otherwise. + + The app needs to connect to Bluetooth peripherals to detect the SumUp Card Terminal correctly. Please confirm with OK as you cannot use your card reader otherwise. + The app needs to access the microphone of your audio jack in order for the SumUp Card Reader to be detected correctly. Please confirm with OK as you cannot use your card reader otherwise. @@ -56,6 +59,10 @@ - + + + + + diff --git a/www/sumup.js b/www/sumup.js index 5ad6131..b95ff66 100644 --- a/www/sumup.js +++ b/www/sumup.js @@ -28,5 +28,8 @@ module.exports = { }, pay: function (amount, currencycode, title) { return new Promise((resolve, reject) => cordova.exec(resolve, reject, 'SumUp', 'pay', [amount, currencycode, title])); + }, + isloggedin: function() { + return new Promise((resolve, reject) => cordova.exec(resolve, reject, 'SumUp', 'isLoggedIn', [])); } }