User login

You are here

HOW TO: Configuring Drupal's Ubercart Bitcoin Payment module

So there's been a bit of noise about better documentation for setting up the Ubercart Bitcoin Payment's module, so you can accept Bitcoin payment's in the equivalent market rates to your existing currencies on your shop.

So, I assume that since you have your Ubercart shop setup, you probably got as far as setting up something like the Paypal gateway or whatever, and that you have a functioning existing shop working.

Now, onto Bitcoin.

Step 1: Get your 'bitcoind' running

bitcoind is the bitcoin server daemon, it manages the bitcoin block chain and also ensures your bitcoins are correctly recorded in the local wallet.dat file. For this process to work correctly, it needs to have a complete downloaded bitcoin block chain data file, this NEEDS to have downloaded completely before you can accept payments through your store, as bitcoind won't be ready to accept payments until this has been completed. As of March 2013, the datafile is about 9Gb(!), it's

We supply the options "-rpcuser=testuser -rpcpassword=testpass", this sets the username and password that is allowed to connect to bitcoind

You can also use the excellent bitcoin-qt graphical interface which will let you know/give you some status that you've sync'ed your block chain data.

bitcoind + bitcoin-qt are both currently available in most Debian based repo's.

Try the usual apt-get routine

then start bitcoind (or run bitcoin-qt until the block chain is complete, and then run the bitcoind once you close bitcoin-qt)

Step 2: Download and Install UC Bitcoin module

Download, Unpack, and all the usual, enable the module at admin/modules, now visit admin/store/settings/payment

Step 3: Configure UC Bitcoin connectivity to `bitcoind` (or skip this and use blockchain.info)

You'll notice the username and password options are set from the same details in Step 1

If you get the error Unable to communicate with the Bitcoin server, check configuration or Bitcoin server status., then check the username+password is the same, and also that the COMPLETE block chain has been downloaded

Step 3.5 If you prefer to use blockchain.info instead of a local bitcoin server

Here's an example of my configuration, note: You *need* to generate a server.cert key file for the SSL to function, see more information here https://en.bitcoin.it/wiki/Enabling_SSL_on_original_client_daemon (The first step), the file should be somewhere readable by your web server, future versions of the module should drop this requirement.

Here is my configuration example for http://blockchain.info account

and a quick snapshot of generating the key file, not the path in the configuration above for the key file location.

Step 4: Enjoy

Now when the user checks-out from your store, the store will convert which ever currency you are currently in - to equivalent amount in BTC (bitcoin)

Extra Strategies:

- You could setup a 'auto forward' address, so any incoming payments will get re-sent to another bitcoin address, this is great for when you don't want your full wallet on a external webserver (good for securing the wallet file)

- Use an external bitcoin wallet server instead of running the bitcoind on your webserver