import { SumUp } from '@awesome-cordova-plugins/sum-up';
constructor(private sumUp: SumUp) { }
const sumUpKeys: SumUpKeys = new SumUpKeys();
sumUpKeys.affiliateKey = 'YOUR_API_KEY';
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));