Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jbrown0824/capacitor-square-payments
https://github.com/jbrown0824/capacitor-square-payments
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/jbrown0824/capacitor-square-payments
- Owner: jbrown0824
- Created: 2021-01-31T16:24:23.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2021-05-24T01:13:11.000Z (over 3 years ago)
- Last Synced: 2024-10-06T01:35:23.835Z (3 months ago)
- Language: Swift
- Size: 146 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-capacitor - Square Payments - Enable Square Payments for Capacitor. (Other plugins)
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,
});
},
```