Skip to content

elvismdev/Bitcoin-Simple-Shop

Repository files navigation

Bitcoin Simple Shop

Proof of concept for a Bitcoin only e-commerce site using Blockchain.info Wallet. This project is intended for small shops with few products (but please don't use it for real business).

Requirements

Installation

Clone this repo to the server root directory.

$ git clone https://github.com/elvismdev/Bitcoin-E-Commerce-Store.git /srv/public_html/.

CD into the server root and install the application dependencies.

$ cd /srv/public_html/ && composer install

Composer install will also ask for the application parameters such as DB connection details, application secret token and Blockchain.info API key and xPub for the wallet account. Then it will auto-generate the app/config/parameters.yml file.

Run the commands below to generate an empty database schema for the shop:

$ php bin/console doctrine:database:create
$ php bin/console doctrine:schema:update --force

Point the server virtual host to /srv/public_html/web/

Load the storefront in your browser http://myshopdomain.com/

Note that you could test drive this simple shop from your own localhost or run it using the Symfony built-in web server, but the paywall page ( /pay/{order_id} ) would fail to load, since the application has to be reachable from the Internet to receive the unique BTC address from Blockchain.info API to submit the order payment.

Store backend

Go to /admin and you'll see an HTTP basic auth prompt, use the default credentials:

  • User: admin
  • Pass: admin

To change the default password run the command below:

php bin/console security:encode-password

Copy the generated password hash and replace the default at this line here. Also you could change the admin username here for whatever you like to.

Learn more about Symfony security and how to extend this in the official docs.

Finally add some products, and have fun (contribute).

Demo checkout

Talk Nerdy To Me