Pages:
Author

Topic: osCommerce Bitcoin Payment Module (Read 14654 times)

hero member
Activity: 536
Merit: 500
April 14, 2012, 12:49:09 PM
#59
Finally I am ready (sort of) to open my little shop. I sell handheld lasers and accessories. Thanks to weex for this wonderful payment module!

http://BitLasers.com
legendary
Activity: 1102
Merit: 1014
April 10, 2012, 11:59:18 PM
#58
Good to hear sergio, that sounds like a reasonable plan. For the improved version, including a query or two in the monitor.py script should allow unpurchased stock to be released.
sr. member
Activity: 313
Merit: 258
April 10, 2012, 05:09:57 PM
#57
weex, I will try to update the code to handle the stock of  items, first I am going to do it the simple way, that is once the bitcoins have been paid, I will update the code in bpn.php  to subtract  from  the items in stock the items sold, that should be fairly easy, but a better approach to the problem would be to reduce the item from stock once the bitcoin address for payment is generated, and if the payment is not made within a certain amount of hours put the item back in stock since the purchase was never completed since the payment was not sent.

The table orders_products has the stock information, since I will be working on this part time it will take me a few weeks to have something working.

I post back once I have it working.
legendary
Activity: 1102
Merit: 1014
April 04, 2012, 11:55:11 PM
#56
Thanks sergio, I have a lot on my plate as I've just launched coinDL but let me know if you'd like to talk design and I'll help as much as I can.
sr. member
Activity: 313
Merit: 258
April 04, 2012, 11:43:38 PM
#55
weex thanks for the bounty is has been received.

It regards the shoping cart module, if you implement updating the stock on items, let me know.
In the meantime I will try to do the same.

Thanks













sr. member
Activity: 313
Merit: 258
April 03, 2012, 03:22:45 AM
#54
weex, let us know when you include the part of the code that updates the inventory, I tried doing it but was not simple.

it basically should work this way, someone buys a product, then that item is put on hold in other words not made available, when the item is fully paid the stock on the item is updated, but if the item is not paid within a certain amount of time, lets say 24 hours, then the item is made available again for purchase, it would also be a good idea to limit the amount of purchases to a given customer to prevent a possible denial of service attack where a customer makes many purchases but pays for none.

Once you have the code, I will be more than happy to test it out.

In regards to the bounty, I still have not received it, could you check if it was sent correctly.

legendary
Activity: 1102
Merit: 1014
April 01, 2012, 02:20:56 AM
#53
The current problem is that inventory is not being  updated, not only that but once a customer does the checkout, the item is always available for sale.

The way it is  working now, it is fine for items that have infinite inventory, like selling a picture, photograph, a howto, a pdf, but for items that can only be sold a single not having the inventory being updated it is a problem.

Please let me know where I should look to try to fix this.

I looked at the code and I see all the updating of stock that is done in the other payment modules is missing from this module.

For example look at all the code that includes the word stock, $stock_check, $stock_left etc in includes/modules/payment/bitcoin.php. I

t is probably going to work to transplant this code from the paypal module to this one but since our payment order is a little different, this stuff will want to be executed as part of the ext/modules/payment/bitcoin/bpn.php script.

Now in terms of timing it might be a little tricky for me but hopefully someone else can take this if I don't get to it within the next week or so.

BTW, I tested your store and it qualifies for the bounty so to claim it, post the url in the bounty thread along with your address.

-weex
sr. member
Activity: 313
Merit: 258
April 01, 2012, 12:37:18 AM
#52
weex, the bitcoin module is working as far as the sale goes, but it has a problem, let me describe the problem, and if you know how to fix it please let me know.

Let say I am selling calling cards, after a customer does the checkout the item should be placed on a hold status, and allow payment to be received within certain amount of hours, if payment is received then the item should be removed from inventory if inventory is 1,  if payment is not received the item should be made available and the hold remove.

The current problem is that inventory is not being  updated, not only that but once a customer does the checkout, the item is always available for sale.

The way it is  working now, it is fine for items that have infinite inventory, like selling a picture, photograph, a howto, a pdf, but for items that can only be sold a single not having the inventory being updated it is a problem.

Please let me know where I should look to try to fix this.

thanks

hero member
Activity: 558
Merit: 500
March 21, 2012, 11:22:46 AM
#51
I already donated to this guy.. Show him some Bitcoin love
legendary
Activity: 1102
Merit: 1014
hero member
Activity: 714
Merit: 500
March 21, 2012, 03:52:43 AM
#48
This is great!

As good as django-bitcoin  !    https://github.com/kangasbros/django-bitcoin
legendary
Activity: 1102
Merit: 1014
March 21, 2012, 03:50:23 AM
#47
Glad to hear that. Ease of use for the customer and site owner are primary goals. Any suggestions anyone has to improve this project are greatly appreciated.
sr. member
Activity: 350
Merit: 250
March 17, 2012, 06:33:45 PM
#46
I like how it displays both regular prices and the bitcoin price, as 90% of customers I've run into have no clue what bitcoin is. This saves many support emails "How much is 3.5BTC???"
legendary
Activity: 1102
Merit: 1014
March 15, 2012, 12:31:11 PM
#45
Sergio,

And thank you very much for implementing it and providing your comments. I have not tried with more unstable versions of bitcoind but your point is well taken. If you would like to submit a patch I will test it and merge it. You can just pm me your new monitor.py file if you want.

About the price options, I have thought about that and yes a checkbox is a good way to do it. I would need to look into this further but if you have any more ideas on it, I'm all ears.

Thanks,

weex
sr. member
Activity: 313
Merit: 258
March 15, 2012, 06:20:04 AM
#44
Weex, thanks for the oscommerce bitcoin payment module, I have been doing some testing for a couple of days and it works great, however I would like to point a few details.

The python script seems to run fine with version simplejson-2.1.0, however there were problems when using version 2.4.

The other thing I noticed, is with all the bitcoind daemons I tried, at times there is a delay is responding caused by the bitcoin daemon, it is something that happens once a while, and it does not mean that the bitdoind daemon has died, on the other hand there were a few bitcoin daemons that did crash, and it would also kill the python script monitor.py, after some testing I decided to run a bitcoin daemon that was stable but the random delay was there and  does not occur frequently.

Maybe it would be a good idea in the part of the script when it checks to see if the daemon has died, not to assume that it has died if it does not respond immediately, but have a second check lets say a minute latter, and if both checks fail then assume the daemon has died and then restart the bitcoin daemon, or somehow have the python script  wait a little longer for bitcoind to respond in the part of the code where it kills the daemon and then restarts it, will the goal of avoid killing it if it is running fine with an occasional slowdown.

In the meantime what I did to get around this problem is to use an stable bitcoin daemon like 0.502, and comment out the part of the code that tries to restart the daemon, and once a while I will get an error message from monitor.py "error: no response from server" when bitcoind does  not reply on time, but the scripts and bitcoind keeps running fine after a small delay and there is no need to restart the daemon.

The other thing I noticed is that it gets the prices from mtgox, and it does a dollar convertion to bitcoins, so it automatically sets the prices in bitcoins and I think this is a good idea for now, however as bitcoin grows it will become someday a currency of its own and in the near future it will be best to set prices directly in bitcoins not tied to the dollar, but for now I think it would be nice  to have a check box next to the price for the admin, so he/she can decide if the price is dollars converted to bitcoins, or bitcoins by themselves not tied to any other currency.

Weex your script is great, I tested a few other ones, and what I liked about yours is that in monitors when payment is received, and automatically updates the status of the order, most other scripts generate the bitcoin address  for the payment, but it is a manual job to verify that the payment has been  made, this scripts automates everything and it is very reliable.

Thanks for the payment modules, it is very good.
legendary
Activity: 1102
Merit: 1014
March 12, 2012, 11:49:12 AM
#43
I don't know if you are the right person, but do you think that it's difficult to make this mod compatible with Bitcoin as you did with this osCommerce module?
( this is just the first mod that I found, I don't know if it is the better one ... )

I think you're best bet is to start a new thread (maybe a bounty) and explain what this is, where it's used, and why it would be good for Bitcoin.
staff
Activity: 4270
Merit: 1209
I support freedom of choice
March 12, 2012, 11:30:23 AM
#42
I don't know if you are the right person, but do you think that it's difficult to make this mod compatible with Bitcoin as you did with this osCommerce module?
( this is just the first mod that I found, I don't know if it is the better one ... )
legendary
Activity: 1102
Merit: 1014
March 11, 2012, 09:10:10 PM
#41
Thanks to Grix for helping me test the module. I've just committed some changes that should make it somewhat usable now.

The payment process has now been changed so a Bitcoin address is only generated and shown (along with a the BTC payment amount) once an order is confirmed.

You are free to put in an order to see how it works at http://www.owneo.com.

You'll have to create an account with an email address to see the entire process but don't worry, you don't have to pay. (maybe we should expire unpaid orders...)
legendary
Activity: 1102
Merit: 1014
March 08, 2012, 07:31:13 PM
#40
I have setup a test store at http://Owneo.com

Note there is no SSL but on the upside, you only have to fill in an email, country, and password to register for checkout.
Pages:
Jump to: