Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/orestis-z/capacitor-zettle

The "ZettlePayment" plugin integrates Zettle payments into Capacitor apps, enabling card transactions with minimal setup. It offers a straightforward JavaScript API for easy payment processing and management.
https://github.com/orestis-z/capacitor-zettle

Last synced: 8 days ago
JSON representation

The "ZettlePayment" plugin integrates Zettle payments into Capacitor apps, enabling card transactions with minimal setup. It offers a straightforward JavaScript API for easy payment processing and management.

Awesome Lists containing this project

README

        

# capacitor-zettle

The "ZettlePayment" plugin integrates Zettle payments into Capacitor apps, enabling card transactions with minimal setup. It offers a straightforward JavaScript API for easy payment processing and management.

## Install

```bash
npm install capacitor-zettle
npx cap sync
```

### Android

```gradle
buildscript {

repositories {
google()
mavenCentral()

// ADD THIS
maven {
url = uri("https://maven.pkg.github.com/iZettle/sdk-android")
credentials(HttpHeaderCredentials) {
name "Authorization"
value "Bearer $project.githubToken"
}
authentication {
header(HttpHeaderAuthentication)
}
}
}
// ...
}

allprojects {
repositories {
google()
mavenCentral()

// ADD THIS
maven {
url = uri("https://maven.pkg.github.com/iZettle/sdk-android")
credentials(HttpHeaderCredentials) {
name "Authorization"
value "Bearer $project.githubToken"
}
authentication {
header(HttpHeaderAuthentication)
}
}
}
}
```

## API

* [`initialize(...)`](#initialize)
* [`initiatePayment(...)`](#initiatepayment)
* [`initiateRefund(...)`](#initiaterefund)
* [`showCardReaderSettings()`](#showcardreadersettings)

### initialize(...)

```typescript
initialize(options: { devMode: boolean; }) => Promise
```

| Param | Type |
| ------------- | ---------------------------------- |
| **`options`** | { devMode: boolean; } |

**Returns:** Promise<any>

--------------------

### initiatePayment(...)

```typescript
initiatePayment(options: { amount: number; currency: string; }) => Promise
```

| Param | Type |
| ------------- | -------------------------------------------------- |
| **`options`** | { amount: number; currency: string; } |

**Returns:** Promise<any>

--------------------

### initiateRefund(...)

```typescript
initiateRefund(options: { amount: number; taxAmount: number; receiptNumber: string; }) => Promise
```

| Param | Type |
| ------------- | -------------------------------------------------------------------------- |
| **`options`** | { amount: number; taxAmount: number; receiptNumber: string; } |

**Returns:** Promise<any>

--------------------

### showCardReaderSettings()

```typescript
showCardReaderSettings() => Promise
```

**Returns:** Promise<any>

--------------------