Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/zh/banano-pay-button

Easy to implement Banano payments via QR code.
https://github.com/zh/banano-pay-button

Last synced: 6 days ago
JSON representation

Easy to implement Banano payments via QR code.

Awesome Lists containing this project

README

        

Easy to implement Banano currency payments via QR code

## Description

The code allows adding Banano currency payments to any Web page by **including a single JavaScript file** and configuring the `

` container to host the button and the resulting QR code.

## Usage

```html


```

## Container data options

All `data-` parameters are send to the underlaying React component. They are divided in two categories:

* **Banano URI** generation parameters:
* `data-title` - Text to be displayed on the button. *Optional*. *Default*: 'Pay with BAN'
* `data-address` - Banano address to send the payment. *Required*
* `data-amount` - Amount of Banano tokens. *Optional*
* `data-label` - Label for easy payment identification. *Optional*
* `data-info` - Add text information (address, amount and label) after the QR code. *Optional*
* **QR Code** configuration - all *data-qr-* parameters are optional:
* `data-qr-size` - QR code size. *Default:* 128
* `data-qr-level` - Error correction level. *Default:* 'M'
* `data-qr-fg` - QR code foreground. *Default:* '#000000'
* `data-qr-bg` - QR code background. *Default:* '#FFFFFF'

## Available Scripts

In the project directory, you can run:

### `yarn start`

Runs the app in the development mode.

Open [http://localhost:8080](http://localhost:8080) to view it in the browser.

The page will reload if you make edits.

### `yarn build`

Builds the app for production to the `public` folder.
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and your app is ready to be deployed!

*public/* directory contains all necessary files (*JavaScript* and *HTML*) so starting any web server (like for example *armor*) in that directory will allow examination of the result.