ACCESS ALL AREAS

uc_bitcoin: A Bitcoin payment method for Ubercart/Drupal

24 November 2010 by Mike Gogulski
Posted in software | 22 Comments »

NOTE: The uc_bitcoin project referenced here is obsolete. Please visit the active project now maintained at drupal.org: http://drupal.org/project/uc_bitcoin

uc_bitcoin

We accept BitcoinA Bitcoin payment method for the Ubercart shopping cart for Drupal.

Version: 0.9.1

Download
Bitcoin.org forum topic
Github repository

Features

  • Generates a new bitcoin address for every order
  • Provides payment address to customer on site at checkout, plus in a subsequent email
  • Configurable timeout after which unpaid transactions will be canceled automatically
  • Configurable number of Bitcoin network confirmations after which an order is considered paid
  • HTTP or HTTPS access to bitcoind

Requirements

Base requirements

  • Ubercart 2.x
  • Drupal 6.x

PHP requirements:

  • PHP5
  • cURL support
  • SSL support (if you’re using HTTPS to talk to bitcoind)

Limitations

  • It is assumed that Bitcoin is the only currency accepted.
  • All prices are assumed to be in Bitcoins, and no currency conversions are performed.
  • Checks for payment receipt are performed via Drupal cron, at least until bitcoind allows attaching a JSON-RPC callback to an address.
  • Orders for downloadables are not tagged as “shipped” once paid.
  • No localization support.

Installation

Configuration

  • Log into your Drupal installation as an administrator.
  • Navigate to Administer->Site building->Modules and enable the Bitcoin module
  • Navigate to Administer->Store administration->Configuration->Payment settings
  • Click “Edit” at top, then “Payment methods”
  • Enable the Bitcoin payment method and disable all others
  • Expand the “Bitcoin settings” dropdown and proceed as follows:
    • Configure your bitcoind server information.
    • If you are using HTTPS to talk to bitcoind and would like to validate the connection using bitcoind’s own SSL certificate, enter the absolute path to the certificate file (server.cert) you’ve uploaded to the server.
    • Configure your payment timeout and number of transaction confirmations required.
    • Save configuration.
  • Navigate to Administer->Store administration->Configuration->Store settings
  • Clik “Edit”, then “Format settings”
  • Expand the “Currency format” dropdown
  • Set “Default currency” and “Currency sign” to “BTC”
  • Save configuration

Donate

Authors

Credits

uc_bitcoin incorporates code from:

License

uc_bitcoin is free and unencumbered public domain software. For more information, see http://unlicense.org/ or the accompanying UNLICENSE file.

  1. 22 Responses to “uc_bitcoin: A Bitcoin payment method for Ubercart/Drupal”

  2. By zachary on 18 December 2010

    Could this be posted on Drupal.org or is it?

    wary of using modules that aren’t on there.

  3. By Mike Gogulski on 18 December 2010

    @Zachary: Sure it could be posted there, but I’m not planning to do it.

    Reason is, I’d have to change the license to GPL (which I think sucks), reformat the code to annoying Drupal standards and do a bunch of other work I’m not too interested in at the moment.

    However, the project was just forked yesterday on Github by someone who appears to be preparing to make it more compatible with drupal.org’s rules, so maybe it’ll get there eventually. See https://github.com/lotyrin/uc_bitcoin

  4. By hurrdurr on 21 April 2011

    question:

    is there a sample cron to check for payments? i have the module up and running, but doesn’t update status of orders

    looked through the release didn’t see a cron file. regular drupal cron doesn’t have anything inside it for uc_bitcoin either

  5. By hurrdurr on 21 April 2011

    wait.. it works! :D
    nevermind it updates now, guess just had to wait for block confirmation

  6. By erik on 13 June 2011

    What is the status of this module on D7 ?

    I’m looking into this at the moment, creating shop with bitcoin stuff.

    I sure wanna try help out on developing it too.

  7. By Mike Gogulski on 13 June 2011

    @Erik: Dunno, never tried it out on D7. There’s probably not going to be an update for a long while, either, so fork and code away…

  8. By fnord0 on 15 July 2011

    getting an error in drupal =>

    warning: include_once(bitcoin.inc) [function.include-once]: failed to open stream: No such file or directory in […]/html/sites/all/modules/uc_bitcoin/uc_bitcoin.module on line 250.
    warning: include_once() [function.include]: Failed opening ‘bitcoin.inc’ for inclusion (include_path=’.:/usr/local/php5/lib/php’) in […]/html/sites/all/modules/uc_bitcoin/uc_bitcoin.module on line 250.

    I notice that the file uc_bitcoin.module has an include_once(“bitcoin.inc”); line, yet this file is not included @ github… can u elaborate on the nature of this file? where ic can be obtained? I tried using bitcoin-php’s bitcoin.inc file, but it gives an error about Exception… any suggestion?

  9. By Doug B on 14 January 2012

    Why do you have to exclude all other payment methods? I want to ADD bitcoin, not replace the other methods. Is this a design limitation in ubercart?

  10. By Doug B on 15 January 2012

    Ah, never mind. I now see why, after installing it. You can only set up your site to accept one currency only.

    Looks like I’ll need another drupal site to handle bitcoins…

    Thanks for taking the time to make this module!

  11. By Erik Lönroth on 15 January 2012

    Thats one of the features I hope to implement later on, but its not trivial since I’m not a Drupal/uc expert.

  12. By Doug B on 15 January 2012

    Yeah. You’d have to separate it out so that each payment type module can specify the currency separately.

    And I’m not sure how that would work out in the cart…you’d have to translate between currencies.

    I suppose one way would be for the cart to be set up to handle and either/or currency. You would have to have a separate link in the “add to cart” block that says, “pay with bitcoins” and “pay with “.

  13. By Erik Lönroth on 15 January 2012

    Something like that. Yeah. What fork of the code did you use?

  14. By Doug B on 15 January 2012

    What do you mean? For Drupal/Ubercart? Or for Mike’s bitcoin module?

  15. By Erik Lönroth on 15 January 2012

    I have a fork of Mikes code made for Drupal7, thats why I’m asking.

  16. By Doug B on 15 January 2012

    Ah. Yes, I’m using the Drupal 6 code, not the 7 code.

  17. By Erik Lönroth on 15 January 2012

    OK.

    I hope it would help you. The D7 port is almost complete. It will be later this spring when I find the time.

  18. By Mike Gogulski on 19 January 2012

    To Doug and Erik: I think that an intermediate goal to where we are headed is to provide built-in currency conversion and dual display. For example, here in Slovakia I’d like to see prices in euros and in Bitcoins. The merchant might choose to anchor their prices in euros, Bitcoins or some other currency, but as consumer I’d get to see at least a momentary translation that would be binding for the current session/transaction/cart/whatever. I started up btcrate.com to this end but never got around to making the plugins talk to it… and it’s now out of date, still trying to talk to a polish site that mtgox subsumed months ago.

  19. By Doug B on 19 January 2012

    I wonder if a method could be implemented easily in Ubercart where you can change currencies site-wide, like what they do here:

    http://www.bitcoinworldmarket.com/products/4318-meyers-lavender-difuser-refill-12×71-oz.aspx?affiliateid=4

    Notice the “Pay in $USD or Bitcoin” dropdown at the upper right corner of the page.

    I have not actually looked at the code itself. Is this easy to do? It seems like you could just update the uber-cart settings programmatically.

  20. By Erik Lönroth on 23 January 2012

    Are you guys interested in picking up the development of this? I would love to cooperate with you on this to make it widely usable.

    I’m going to finish the port of the basic functionality for D7 this month. But the functionality of being able to co-exist with other payment methods needs some serious work I guess.

  21. By Doug B on 24 January 2012

    I’m discussing this with my biz partner, who is a Drupal expert.

    But, it would only be for Drupal 6 if we got involved with it.

  22. By dgtlmoon on 9 February 2012

    hey guys

    i just put my hand up to help out with the drupal.org uc_bitcoin project, so feel free to send emails this way.. (dgtlmoon@gmail.com), glad to help!

  23. By Mike Gogulski on 9 February 2012

    Nice to hear, dgtlmoon.

    To all here: I’m declaring my version uc_bitcoin obsolete, as it’s been entirey superseded by the active development at drupal.org.


    comments rss Comments RSS

Post a Comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

  • Categories

  • Archives

  • Core Dogma