Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Bitcoin Payment Module


weex

Recommended Posts

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

Link to comment
Share on other sites

  • 6 months later...
  • 3 months later...

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!

Link to comment
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?

Link to comment
Share on other sites

  • 2 weeks later...

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
Link to comment
Share on other sites

  • 2 months later...

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
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...