Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -75,5 +77,9 @@ interface SumUpPayment {

Opens the settings page.

`SumUp.isloggedin(): Promise<BOOLEAN>`

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
9 changes: 8 additions & 1 deletion plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@
<config-file target="*-Info.plist" parent="NSBluetoothPeripheralUsageDescription">
<string>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.</string>
</config-file>
<config-file target="*-Info.plist" parent="NSBluetoothAlwaysUsageDescription">
<string>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.</string>
</config-file>
<config-file target="*-Info.plist" parent="NSMicrophoneUsageDescription">
<string>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.</string>
</config-file>
Expand All @@ -56,6 +59,10 @@
</config-file>
<header-file src="src/ios/CDVSumUp.h" />
<source-file src="src/ios/CDVSumUp.m" />
<framework src="SumUpSDK" type="podspec" spec="~> 3.3.0" />
<framework src="SumUpSDK" type="podspec" spec="~> 3.4.0" />
</platform>

<js-module src="www/sumup.js" name="SumUp">
<clobbers target="SumUp" />
</js-module>
</plugin>
3 changes: 3 additions & 0 deletions www/sumup.js
Original file line number Diff line number Diff line change
Expand Up @@ -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', []));
}
}