Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/jbrown0824/capacitor-square-payments


https://github.com/jbrown0824/capacitor-square-payments

Last synced: about 2 months ago
JSON representation

Awesome Lists containing this project

README

        

# Capacitor Square Payments

This is massively WIP. Only has iOS support as of 2/20/21. Still need to figure out how to enable ejecting Swift Views.

## Installation

```
npm install --save capacitor-square-payments
npx cap update
```

Then:

```
import { Plugins } from '@capacitor/core';
const { SquarePayment } = Plugins;

SquarePayment.initApp({
applicationId: 'REPLACE_ME',
appleMerchantId: 'REPLACE ME: APPLE MERCHANT ID',
});

// Request Payment (Returns a nonce you can use to complete payment)
async makeNativePaymentRequest() {
return await SquarePayment.requestNonce({
amount: this.order.order_total,
});
},
```