Skip to main content
Version: v5

SumUp

Plugin to communicate with a SumUp payment terminal

https://github.com/mariusbackes/cordova-plugin-sumup

Stuck on a Cordova issue?

Don't waste precious time on plugin issues.

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

$ npm install cordova-sumup-plugin 
$ npm install @awesome-cordova-plugins/sum-up
$ ionic cap sync

Supported Platforms

  • Android
  • iOS

Usage

React

Learn more about using Ionic Native components in React

Angular

import { SumUp } from '@awesome-cordova-plugins/sum-up';


constructor(private sumUp: SumUp) { }

const sumUpKeys: SumUpKeys = new SumUpKeys();
sumUpKeys.affiliateKey = 'YOUR_API_KEY'; // if not provided in installation
sumUpKeys.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));