From a57923bf1f13fd6959d9004721a4a293d047679c Mon Sep 17 00:00:00 2001 From: Simon Smith Date: Tue, 18 Feb 2020 11:23:47 +0000 Subject: [PATCH 1/6] Update plugin.xml add missing line to allow direct calling window.SumUp.login OR Sumup.login --- plugin.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugin.xml b/plugin.xml index f9b1050..2dcfa4d 100644 --- a/plugin.xml +++ b/plugin.xml @@ -58,4 +58,8 @@ + + + + From f589e493a5a129f75cfa31972e91c3905c3b5749 Mon Sep 17 00:00:00 2001 From: Simon Smith Date: Tue, 18 Feb 2020 11:25:54 +0000 Subject: [PATCH 2/6] Update README.md --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6e22847..8f66218 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 From c61f05c7d4b27f9cdc1d82e537167700c65462bc Mon Sep 17 00:00:00 2001 From: Simon Smith Date: Tue, 18 Feb 2020 11:34:40 +0000 Subject: [PATCH 3/6] Update plugin.xml --- plugin.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin.xml b/plugin.xml index 2dcfa4d..eee6546 100644 --- a/plugin.xml +++ b/plugin.xml @@ -56,7 +56,7 @@ - + From ff1f23085fe004fd4b255a7008e7bcca8c59a795 Mon Sep 17 00:00:00 2001 From: Simon Smith Date: Tue, 18 Feb 2020 11:43:30 +0000 Subject: [PATCH 4/6] Update plugin.xml --- plugin.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugin.xml b/plugin.xml index eee6546..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. From 1334c397ae5d2cf678a9620211a04107af08d447 Mon Sep 17 00:00:00 2001 From: Simon Smith Date: Tue, 18 Feb 2020 12:26:59 +0000 Subject: [PATCH 5/6] return isloggedin check if user already logged in --- www/sumup.js | 3 +++ 1 file changed, 3 insertions(+) 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', [])); } } From 45811ce4b6ceb8672d578e770dfe7fe71bda3b51 Mon Sep 17 00:00:00 2001 From: Simon Smith Date: Tue, 18 Feb 2020 12:31:22 +0000 Subject: [PATCH 6/6] Update README.md --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 8f66218..2c97b05 100644 --- a/README.md +++ b/README.md @@ -77,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