Latest News: (loading..)
weex

Bitcoin Payment Module

6 posts in this topic

Hello folks, I'm relatively new to osCommerce but have flirted with it in the past. I have an interest in Bitcoin and was surprised at how limited the support was in osCommerce for it. So I've created the module below. I'm interested to know the best way to release it officially for osCommerce users to get it as easily as possible.

 

Thanks,

 

- weex

 

osCommerce Bitcoin Payment Module v0.6

 

available at: https://github.com/weex/oscommerce-bitcoin

 

This module enables your osCommerce webstore to accept Bitcoin.

 

Features:

 

* 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

 

Requirements:

 

osCommerce (tested so far only with v2.3.1)

Python with modules: MySQLdb and simplejson

bitcoind

 

 

Inspired by http://addons.oscommerce.com/info/8170 by phoenix.x742 / 2 Oct 2011

bpn.php modified from an osCommerce Paypal IPN script

Share this post


Link to post
Share on other sites

Hi Weex,

 

Is this Bitcoin Payment Module multi-currency - can I use it alongside a PayPal Payment Module?

 

Does it download exchange rates against BTC?

 

Thanks,

 

Alistair

Share this post


Link to post
Share on other sites

Hey together!

I just downloaded the osCommerce-Bitcoin-Module and read the README. There are two points wich I don't understand. Maybe someone can help me out there..

 

* Enable the payment module throught your administration.

- Set up adress/port/username/passwd/cert file

- Set up the number of node you want for a payment to be considered as "valid"

 

Where do I get this "adress/port/username/passwd/cert file"? Do I have to register somewhere?

And what is this "number of node"?

 

Thanks for any help!

Share this post


Link to post
Share on other sites

Hm, I guess I got to run my own server somehow? And those "adress/port/username.." is where the RPC should land? Means, when I start my own bitcoind-daemon on the same server where osCommerce is running, I have to create this bitcoin.conf and set my own username/pass like

rpcuser=user

rpcpassword=pass

.. and then the host and port should be 127.0.0.1:8332, right?

 

BUT what if I'm not allowed to run Python with modules: MySQLdb and simplejson, bitcoind? Is there any other way to get this running? Do I really have to go to something like Mt.Gox?

Share this post


Link to post
Share on other sites

Nobody has any clue on how to use any of those osCommerce-Modules??

 

I'm still lost... :( Any Help would be much appreciated!

 

I tried these, but I'm still confused about the Host/Port/Username/Password-stuff to fill in... ?!

http://addons.oscommerce.com/info/8007

http://addons.oscommerce.com/info/8170

http://addons.oscommerce.com/info/8176

Edited by chrischris

Share this post


Link to post
Share on other sites

Hello together,

I never got this Module from weex running.. Anyway, now I'm using Paysius and it works..

 

I'm using http://addons.oscommerce.com/info/4843 to update my currencys. But BTC are not working for oanda or xe. So I added this function to get the current BTC-Rates automatically from the MTGox-Ticker.

 

function updateBTC() {
 $last = 0;
 $result = false;
 // for USD use this path
 //$url = "https://data.mtgox.com/api/2/BTCUSD/money/ticker";
 // EUR
 $url = "https://data.mtgox.com/api/2/BTCEUR/money/ticker";
 if ($curly = curl_init()) {
  curl_setopt($curly, CURLOPT_URL, $url);
  curl_setopt($curly, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($curly, CURLOPT_SSL_VERIFYHOST, false);
  curl_setopt($curly, CURLOPT_SSL_VERIFYPEER, false);
  curl_setopt($curly, CURLOPT_TIMEOUT, 5);
  curl_setopt($curly, CURLOPT_USERAGENT, 'Mozilla/4.0 (compatible; MtGox PHP client; '.php_uname('s').'; PHP/'.phpversion().')');
  if ($output = curl_exec($curly)) {
   if ($result = json_decode($output, true)) {
 if ($result['result'] == "success") {
  $last = round(1/$result['data']['last']['value'], 8);
 }
   }
  }
 }
 $curly = NULL;
 return $last;
}

Edited by chrischris

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now