0.1.1 • Published 4 years ago
vitawallet-pay-button v0.1.1
vitawallet-pay-button
Website | Instagram | Twitter | Telegram
The vitawallet-pay-button is a library that allows integrating from external sites the possibility of receiving payments in our VitaWallet.
Installation
In a browser:
<script src="https://app.vitawallet.io/vitawallet-pay-button.js"></script>
Using npm:
$ npm install --save vitawallet-pay-button
In Node.js:
var payButton = require('vitawallet-pay-button');
In ReactJS:
import { payButton } from "vitawallet-pay-button";
How to use?
Example in ReactJS:
<Button
className="btn-green"
onClick={() => payButton(email, 100, 'usd', 'Pago de zapatos', true, ENV)}>
Pagar con VitaWallet
</Button>
Arguments
These are the arguments available on the payment button.
- email -> Your email address in VitaWallet. Ex: 'soporte@vitawallet.io'
- amount -> Payment amount. Ex: 100. (optional)
- money -> Transaction Currency. Options 'btc', 'usd', 'clp'. (optional)
- description -> Transaction Description. Ex: 'Pago de zapatos'. (optional)
- force -> No change currency. Ex: false. (optional) (default: true)
- env -> Enviroment 'qa' or 'prod'. (optional)