ACCESS ALL AREAS

Bitcoin payment processor for VirtueMart/Joomla!

19 November 2010 by Mike Gogulski
Posted in software | 10 Comments »

bitcoin-virtuemart

We accept BitcoinA Bitcoin payment processor plugin for the VirtueMart shopping cart for Joomla!.

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

  • Joomla! 1.5
  • VirtueMart 1.1.x

PHP requirements:

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

Other requirements:

  • Access to create a cronjob on your web server (or elsewhere)
  • wget or the curl commandline tool on the machine running the cronjob

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.
  • A cronjob is required to check for payment receipt, at least until bitcoind allows attaching a JSON-RPC callback to an address.
  • Emailing the bitcoin address requires an extra email to be sent (modifying the order confirmation message VirtueMart sends would be preferable, but the API doesn’t support that).
  • Validation of bitcoind’s generated address is based only on its length. The PHP solution available requires the GMP extension to be installed.
  • Orders for downloadables are not tagged as “shipped” once paid.
  • The Bitcoin address associated with a transaction is stored in a database field not intended for it.
  • No localization support.

Installation

Configuration

  • Log into your Joomla! installation as an administrator.
  • Click Components -> VirtueMart on the main menu.
  • At left, click Store -> List Payment Methods.
  • Click Bitcoin in the list.
  • Click the checkbox next to “Name” at the top of the list, then clear the Bitcoin checkbox.
  • Click “Unpublish” at top.
  • On the “Payment Method Form” tab, configure as follows:
    • Active – checked
    • Payment Method Name – Bitcoin
    • Code – BC
    • Payment class name – ps_bitcoin
    • Payment method type – HTML-Form based (e.g. PayPal)
  • Now click to the “Configuration” tab 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.
    • Note the instruction to create a cronjob. The cronjob is what queries bitcoind periodically to see if pending orders have been paid. The cronjob is mandatory.
    • Leave the “Order status” options at their defaults:
      • Successful = Confirmed
      • Uncompleted = Pending
      • Failed = Cancelled
    • Copy and paste all of the code from extrainfo.php in the distribution archive’s root directory into the “Payment Extra Info” box.
    • Save.
  • Create the Bitcoin currency:
    • Assuming you’re still in the VirtueMart component, click Admin -> List Currencies at left.
    • Click New at top right.
    • Enter:
      • Currency name: Bitcoin
      • Currency code: BTC
    • Save.
  • Set the store-wide currency:
    • Click Store -> Edit Store
    • In the “Currency Display Style” box:
      • Open “Currency” and select Bitcoin.
      • Enter “BTC” as the Currency Symbol.
      • Under “List of accepted currencies” click Bitcoin and make sure that all other currencies are deselected.
    • Save.

Donate

Authors

Credits

  • jsonrpc
  • PayCific

License

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

  1. 10 Responses to “Bitcoin payment processor for VirtueMart/Joomla!”

  2. By Josh on 31 May 2011

    Hi Mike!

    I have a problem installing the bitcoin under JOOMLA 1.5.23 with an integrated VirtueMart 1.1.8.
    I untared the whole thing inside the folder, where Joomla was installed. But the Bitcoin didn’t show up in the ‘Payment Methods List’.
    Do you have any ideas why it doesn’t work?
    X Josh

  3. By Mike Gogulski on 31 May 2011

    Hi Josh, thanks for writing.

    To your question, no, not really sure. If you’d like to engage me to work that out for you, though, for a few Bitcoins, go to “About” here and get me live via any of the contacts.

  4. By Paul on 17 June 2011

    Hi Mike, in case you don’t know about it, there is a new payment module for Magento that automatically validates payments and gets exchange rates from Bitcoincharts….

    http://forum.bitcoin.org/index.php?topic=18294.0

    …. it’s open source on github. It’d be phenomenal to get that functionality into Virtuemart with the ability to accept multiple payment options.

    Thanks for reading,

    Paul

  5. By sergio on 11 July 2011

    Hi, I ran into the same problem someone on this forum ran into, Bitcoin did not show up in the Payment Methods List, I did the testing about a month ago.

    What exact version of virtuemart and joomla did you use when testing the bitcoin module ?

  6. By Kevin on 11 November 2011

    To those that are untaring it with Joomla, I had the same problem and this is how I fixed it.

    1. First untar the downloaded file onto your computer.
    2. Open the new folder. When you look at it you will see a folder called administrator. Open that and you will see components. Open components and you will see com_virtuemart. Open that folder and you have 2 folders, html and classes.
    3. FTP your Joomla website
    4. Go to /administrator/com_virtuemart/classes
    5. Upload the bitcoin.inc file and the includes folder to /administrator/com_virtuemart/classes
    6. Go to /administrator/com_virtuemart/classes/payment
    7. Upload the two files (ps_bitcoin.cfg.php and ps_bitcoin.php) in your home directory to /administrator/com_virtuemart/classes/payment

    Congrats it is installed.

  7. By David Covin on 2 February 2012

    Most likely the problem folks above are running into is that the files in the tarball use DOS/Windows line-ending characters (in Perl, “\r\n”) instead of Unix (“\n”). Some FTP clients will translate for you automatically, if you transfer the files in ASCII mode.

    Under my version of VirtueMart, 1.1.9, I had to add a Configuration step 4: click “New”
    (I suppose I could have instead replaced step 3 with “click ‘Add New Payment Method'”)

    Then I had to fill in the Payment Method Name and Code as above, and select ps_bitcoin from the Payment Class Name list, and click Apply before I could go to the Configuration tab.

  8. By sergio on 23 February 2012

    I tried the suggesting by David Covin, and it got me a lot further, the only problem is that at checkout I get errors.

    this are the errors:
    Error: The Bitcoin server was unable to generate an address for your payment. Please contact the site administrator.
    Error: Failure in Processing the Payment (ps_bitcoin)

    I am using Joomla! 1.5.23 Stable [ senu takaa ama baji (VirtueMart eCommerce Bundle), it comes with virtualmart 1.1.9, and the latest bitcoind for linux 0.6000

    Does anyone have bitcoin-virtuamart working, and if yes, what version of bitcoind, joomla, and virtuamart?

  9. By David Covin on 21 March 2012

    I have it working with Virtuemart 1.1.9, Joomla! 1.5.24 Stable [ senu takaa ama naiki ], and an ancient version of bitcoind (0.319) that I was able to find packaged for the ancient version of Debian my hosting provider is running. I have keypool=100 set in my bitcoin.conf; perhaps that is relevant to your problem? I also have a cron job that restarts bitcoind when it dies, but I think you’d get a different error if bitcoind wasn’t talking back at all. (I also hacked up a USD->BTC conversion module based on the default Virtuemart currency converter– which turns out to have some exciting default behavior!– using hourly quotes of the daily average exchange rate from mtgox. I may put the code up somewhere after I get around to rewriting it to actually use JSON-RPC, which mtgox.com happily talks, instead of simply parsing the output with a regex, which works but is Not The Right Thing To Do).

  10. By sergio on 3 April 2012

    I got a little further this time, instead of https, I am using http and it does generate the bitcoin address, and it does send out both emails “Tiendita purchase order #”, and “order status change: your order #” but the status of the purchase stays on pending, it is like the cron job it is not doing anything, I tried running manually and it did not do anything.
    I also tried using keypool=100 in bitcoin.conf and it did not solve the problem.

    So far the order stays on pending status, since the payment when sent never gets confirmed.

    Any ideas on what the problem can be? or what to try?

  1. 1 Trackback(s)

  2. 30 May 2011: eCommerce und Bitcoin - myBitcoin.de

    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