0.0.2 • Published 5 years ago

@confirmo/bitcoin-pay-overlay v0.0.2

Weekly downloads
1
License
-
Repository
-
Last release
5 years ago

BitcoinPay Overlay

Usage

CDN

<script type="text/javascript" src="./bitcoin-pay.js"></script>
<script type="text/javascript">
BitcoinPay.BPayInvoice.open(invoice_url, callback_fnc);
</script>

npm module

npm install @confirmo/bitcoin-pay-overlay --save
import {BPayInvoice} from '@confirmo/bitcoin-pay-overlay';

BPayInvoice.open(invoice_url, callback_fnc);

API

/**
 * Open Bitcoin Pay invoice overlay
 * 
 * @param {string} invoice_url - URL of invoice.
 * @param {callback} [callback_fnc] - Optional - callback called when overlay is closed
 * 
 * @example
 * 
 * // URL of invoice created from REST API
 * const invoice_url = 'https://bitcoin-pay.demo/#/public/invoice/invv9e1rxdz8';
 * 
 * // Callback called when overlay is closed
 * const callback_fnc = () => alert('Overlay has been closed');
 * BPayInvoice.open(invoice_url, callback_fnc);
 */
BPayInvoice.open(invoice_url, callback_fnc);

/**
 * Closes Bitcoin Pay overlay
 */
BPayInvoice.close();
0.0.9

5 years ago

0.0.8

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago