5 |
6 |
7 |
17 |
18 |
27 |
--------------------------------------------------------------------------------
/netlify.toml:
--------------------------------------------------------------------------------
1 | [build]
2 | publish = "dist"
3 | command = "yarn run build"
4 |
5 | [template.environment]
6 | VUE_APP_TITLE = "Title for landing page"
7 | VUE_APP_SUBTITLE = "Subtitle for landing page"
8 | VUE_APP_IMAGE_URL = "Image URL for landing page"
9 | VUE_APP_BITCOIN_NETWORK = "Set to test or mainnet"
10 | VUE_APP_BITCOIN_ADDRESS = "The bitcoin address where you want to get paid"
11 | VUE_APP_CONTENT_URL = "The url of the content you want to give access to after paying"
12 | VUE_APP_BITCOIN_AMOUNT = "The amount in bitcoin you want to charge"
--------------------------------------------------------------------------------
/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
9 |
55 |
56 |
57 |
73 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | 
2 |
3 | # Vue.js Bitcoin Checkout page
4 |
5 | If you sell digital products online and you're looking for an easy way to accept bitcoin this is a demo project that allows you to specify the address and amount you'd like to receive to automatically access your content. Think of it as an alternative to Gumroad or Stripe checkout button for crypto.
6 |
7 | It is built with Vue.js and the main component is `Checkout.vue` where QR code rendering, socket connections and callbacks are handled.
8 | It connects to Bitpay's servers to access real-time information about payments.
9 |
10 | Demo site - [https://checkout-demo.tiagoalves.me/](https://checkout-demo.tiagoalves.me/)
11 |
12 | *(This is a work in progress. Use at your own risk in production.)*
13 |
14 | ## One-click deployment
15 |
16 |
17 | [](https://app.netlify.com/start/deploy?repository=https://github.com/alvesjtiago/vue-bitcoin-checkout)
18 |
19 | ## Environment variables
20 |
21 | * `VUE_APP_TITLE`: Title for landing page
22 | * `VUE_APP_SUBTITLE`: Subtitle for landing page
23 | * `VUE_APP_IMAGE_URL`: Image URL for landing page
24 | * `VUE_APP_BITCOIN_NETWORK`: Set to test or mainnet
25 | * `VUE_APP_BITCOIN_ADDRESS`: The bitcoin address where you want to get paid
26 | * `VUE_APP_CONTENT_URL`: The url of the content you want to give access to after paying
27 | * `VUE_APP_BITCOIN_AMOUNT`: The amount in bitcoin you want to charge
28 |
29 | ## Development
30 |
31 | ### Project setup
32 | ```
33 | yarn install
34 | ```
35 |
36 | ### Compiles and hot-reloads for development
37 | ```
38 | yarn run serve
39 | ```
40 |
41 | ### Compiles and minifies for production
42 | ```
43 | yarn run build
44 | ```
45 |
46 | ### Lints and fixes files
47 | ```
48 | yarn run lint
49 | ```
50 |
--------------------------------------------------------------------------------
/src/components/Modal.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |