Top-Up is a sample application that applies a bitcoin payment to a targeted account service.
- Integration with BitPay bitcoin payment service using modal invoice
- Supports bitcoin livenet and testnet
- Configure from 160+ currencies
- Responsive UI for mobile and desktop presentation
- Form validation & error handling
- Modular design uses service providers
- AngularJS application
- Bootstrap presentation
- Easily configured
You must provide API access keys/tokens for each service you intend to use. See appConfig.json.
This application integrates with the BitPay merchant services platform for accepting bitcoin as a payment from your customers. You can add additional payment methods by creating providers and calling your providers from paymentService.js.
For the application to create BitPay invoices you must link the application to a BitPay merchant account. You can configure the application for both production (livenet transactions) and development (testnet transactions) simultaneously. Follow these steps:
- Login to your
production BitPay merchant account
ortest BitPay merchant account
- Click "Payment Tools", then "Manage API Tokens", then "Add New Token"
- Enter a label (e.g. "Top-Up app")
- Uncheck the "Require Authentication" checkbox
- Click "Add Token" button
- Copy and paste the Token into the api token entry in appConfig.json
You can add additional top-up services by creating providers and calling your providers from topUpService.js. This application includes a stubTopUpService that serves as a placeholder for your top-up service. Use this as a reference implementation for your top-up service.
Obtain API keys and configure your top-up service as required. See appConfig.json. The key topUpService
selects your target service at runtime.
Ensure you have Node, bower and grunt installed, then install and start Top-Up:
npm install
npm start
Visit localhost:8000
to view the app.
After changes are made re-build and re-start Top-Up:
grunt
npm start
You can target payment methods for development or production. See appConfig.json. Ensure you have Node, bower and grunt installed, then install and start Top-Up:
npm install
grunt --target=prod
npm start
Visit localhost:8000
to view the app.
- [TODO] There is no IPN handler for BitPay to POST invoice notifications to the application.
- The application relies on window.postMessage() to receive payment status from the invoice.
- GitHub Issues
- Open an issue if you are having problems with this project
Top-Up is released under the MIT License. Please refer to the LICENSE file that accompanies this project for more information including complete terms and conditions.