This is a work in progress but the goal will be automated Bitcoin payment processing using just oscommerce, bitcoind running locally, and a bit of python. In regards to whether it's wise to store BTC locally, the python script will offload BTC to the shopkeeper's address of choice not long after it's confirmed.

An update on current status..and this is exciting! Did you know there are 12,700 live osCommerce webstores?

This project now works with the following features and was tested against osCommerce v2.3.1

* Bitcoind and monitor.py can be run on a server other than the osCommerce hosting server * Creates a unique payment address for each order* Updates order to Delivered when payment is received (# of confirmations is configurable)* Forwards Bitcoins to forwarding address once the local bitcoind has more than a threshold amount* Python script monitors bitcoind and will restart it if it becomes unresponsive

Todo:

* Update readme and write an installation guide with tips on configuring osCommerce with the BTC currency* Include BTCUSD exchange rate update in python script* Include a watchdog script to make sure monitor.py is running via cronjob.

It's been fun testing with 0 confirmations and seeing the order status update all by itself.

Enabling the module doesn't work for me. It redirects me to a blank page, and when I go back it doesn't show up in the payment module menu, even though under "install modules" it says that it is enabled.

This is fixed. I tested it by uninstalling the module and reinstalling it.

When I removed it in the half-installed state you encountered, it appeared to have removed another payment module. If you know more about how osCommerce determines if a module is installed, you might want to edit the sql directly. I'm thinking it's just removing the MODULE_PAYMENT_BITCOIN_ records from the configuration table.

Thanks for testing, create an issue at github if you run into any other problems.

I'd like to use this on my website, but I am inexperienced with bitcoin servers.. I host my website on a webserver, so I can't run bitcoind and the python script there, right? Can I run bitcoind and the python script on my home computer that I turn off every night, or does it have to be online 24/7? Do I have to forward any ports?

Alternatively, are there any free or very cheap VPS's that I can use for this purpose?

I'd like to use this on my website, but I am inexperienced with bitcoin servers.. I host my website on a webserver, so I can't run bitcoind and the python script there, right? Can I run bitcoind and the python script on my home computer that I turn off every night, or does it have to be online 24/7? Do I have to forward any ports?

Alternatively, are there any free or very cheap VPS's that I can use for this purpose?

The python script and bitcoind will require shell access which is more likely to be available in a VPS or dedicated server. You should be able to get cheap VPS for $10-20 a month to try it out.

Starting out I would recommend bitcoind and the python script (monitor.py) be running 24x7 on the webserver. Running it only part time will not work and running it on your home computer will require a stable internet connection and the bitcoin RPC port to be opened on your firewall. Like I said, a cheap vps with everything running there is best.

Then you can set a FORWARDING_ADDRESS and the script can forward any funds to your home or company wallet.

The module I started with asked bitcoind for a new address and associated it with an account name given by the buyer's email address and the osCommerce session id with which the purchase was made. At that point it was up to the store owner to monitor those addresses and update the order status. Maybe you had something more that wasn't released as part of that module?

The additions I made automate this process. The python script monitor.py periodically looks at the osCommerce database to find orders with order status Pending and that used the Bitcoin Payment module. It then queries bitcoind to see if enough funds have been sent to the addresses associated with Pending orders. If enough were sent it takes the next step.

That step is to call another part of this module called the bpn.php script. This script was derived from a Paypal IPN script (IPN is where Paypal can tell osCommerce at some later time that payment has been made, cleared, etc). When called with the notification key and an order id, it will fire off an email to the buyer and set the order status to Delivered.

I'm actually not sure what is the best order status to change to but it's a simple change to make in the bpn.php script for anyone who wants to customize it.

That sounds really badass. I'm looking forward to the update. Will it require the phoenix mod be installed underneath yours? Will yours include all of the phoenix mod? Will I have to delete the phoenix mod to get yours to work?

Right now when people order it puts them in pending status. It's a pain in the ass though because I have to log into my server every day and see if anybody has sent the coins, usually not. Most people order and then never send, I think it's because they ordered not knowing that I only accept Bitcoin as payment, and they're like "huh?"

When somebody does pay I put them in "processing" and send them a thank you email. After I've stuck the envelope in the mail I change it to delivered.

When do you expect this to be finished/good enough for long term reliable use?

That's a good question and I suppose it's ready for someone running a test store or someone with php/python/mysql experience. I've been testing it as I go and it is based in part on some code that has seen long term use. I'll setup a test store in the next couple days so people can try it out.

To get this ball rolling, I'll start a bounty of 2 BTC for the first person other than myself who gets a store running. Contribute if you'd like:1D3NrskpzB5Ydzs2RByDavbqqenbksgNoB (Bounty thread)

Using your quote, 12700 oscommerce shops. Do you realise those numbers are very low?Prestashop has more than 80,000 active shops and yet we don't see much of them using bitcoin. Also, Prestashop is still in active development.I suspect you targeted the wrong platform. Nonetheless: Great work!

Using your quote, 12700 oscommerce shops. Do you realise those numbers are very low?Prestashop has more than 80,000 active shops and yet we don't see much of them using bitcoin. Also, Prestashop is still in active development.I suspect you targeted the wrong platform. Nonetheless: Great work!

Thanks, this is what I'm hearing and after a bit of browsing of the example shops I think many links are dead. Still, this project was sparked by a request from someone who needs it so I don't feel it is diminished.

Much of the code in monitor.py can be reused to support Prestashop, Zencart, and others. What I've found is several modules that are not comfortable talking to bitcoind and this one may help on that front.

One shopping in cart in particular that is interesting is Shopify. To support them you pretty much have to run bitcoind for anyone who wants to add your app.