SumUp
Plugin to communicate with a SumUp payment terminal
https://github.com/mariusbackes/cordova-plugin-sumup
Stuck on a Cordova issue?
If you're building a serious project, you can't afford to spend hours troubleshooting. Ionic’s experts offer premium advisory services for both community plugins and premier plugins.
Installation#
- Capacitor
- Cordova
- Enterprise
$ npm install cordova-sumup-plugin $ npm install @ionic-native/sum-up $ ionic cap sync
$ ionic cordova plugin add cordova-sumup-plugin $ npm install @ionic-native/sum-up
Ionic Enterprise comes with fully supported and maintained plugins from the Ionic Team. Learn More or if you're interested in an enterprise version of this plugin Contact Us
#
Supported Platforms- Android
- iOS
#
Usage#
ReactLearn more about using Ionic Native components in React
#
Angularimport { SumUp } from '@ionic-native/sum-up';
constructor(private sumUp: SumUp) { }
const sumUpKeys: SumUpKeys = new SumUpKeys();sumUpKeys.affiliateKey = 'YOUR_API_KEY'; // if not provided in installationsumUpKeys.accessToken = 'YOUR_ACCESS_TOKEN';
this.sumUp.login(sumUpKeys) .then((res: SumUpResponse) => console.log(res)) .catch((error: SumUpResponse) => console.error(error));
this.sumUp.auth('YOUR_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));