Jump to content
vblanch

[MODULE] Cryptocurrency - Accept payments in Bitcoins, Litecoins, Dogecoins, etc.

Recommended Posts

Hi people,

 

With this module you will be able to set up any number of cryptocurrencies as Bitcoin, Litecoin, or Dogecoin as a payment method for your shop. *NEW: Added auto update for Bitcoin and Dogecoin conversion rates*.

 

Your customers will be shown the wallet address where they have to make the transaction at the end of the checkout process, and they also will be sent an email with similar instructions (very similar to the Bank Wire module). However, unlike the Bank Wire module, you can set as many cryptocurrencies as you like (and therefore as many wallets as you like).

 

Please note that you will have to process the payments and orders manually just like in the "Bank Wire" method.

 

For Bitcoin, I added an auto-update feature for the conversion rate in 1.0.2. For other cryptocurrencies, you will have to change the exchange rate between these currencies and your main currency in your shop manually (or with another module). In the readme file included all this is explained step by step.

 

How to install: follow instructions in "readme.txt" please.

 

This module is based on the "Bank Wire" module by Prestashop, which works with 1.5.x versions. Not tested with 1.4.x versions or earlier.

 

Please leave a message if this module works for you and also if you want to help with translations or bug fixes for it.

 

Thanks!

 

Source code: https://github.com/vblanch/cryptocurrency_ps_module

 

Version history: 1.0.0 Initial release.

Version history: 1.0.1 Fixed zip, now contains the "cryptocurrency" folder, just copy it in your /modules folder.

Version history: 1.0.2 Added auto update for Bitcoin conversion rate.

Version history: 1.0.3 Added auto update for Dogecoin conversion rate.

 

*Edit 1: added screenshot of the orders made with cryptos.

 

 

post-746300-0-78561400-1392770230_thumb.jpg

post-746300-0-10873400-1392770237_thumb.jpg

post-746300-0-63069700-1392770244_thumb.jpg

post-746300-0-29188900-1392770264_thumb.jpg

post-746300-0-78176300-1392770271_thumb.jpg

post-746300-0-88662600-1392831954_thumb.jpg

cryptocurrency_ps_module_1.0.3.zip

Edited by vblanch

Share this post


Link to post
Share on other sites

Hi

 

Are you planning to integrate automatic exchange rate?

 

Thank you

 

Hi there,

I'm thinking of making a module for that. However since I accept donations for my free modules and so far I got none, I guess I will have to make it a paid module.

 

However, if you want to modify the "Bitcoin ticker" program, you could easily use it to update the database and have an automated exchange rate on every visit.

Edited by vblanch

Share this post


Link to post
Share on other sites

Hi

 

Are you planning to integrate automatic exchange rate?

 

Thank you

 

Automatic exchange rate added for Bitcoin. Exchange rate is auto-updated every time a customer chooses Bitcoin as the cart currency and reloads any page (I hooked the module to the displayHeader hook)

 

Enjoy :-)

Share this post


Link to post
Share on other sites

Fantastic, thanks a lot,

waiting for a dogecoin auto-update, as I can´t do it myself

 

Hi,

I found that some guys on Reddit posted a snippet to take the USD value from moolah and coinmill of DOGE, I will add it soon... very currency, such value wow!

Share this post


Link to post
Share on other sites

Hello.  I installed the model and followed your setup directions, however when doing a test I got the following remark:

 

"No payment modules have been installed."

 

I am running 1.5.6.2

 

Please advise why this would occur.  I followed your readme.tx to the T.

 

Thanks,

Len

Share this post


Link to post
Share on other sites

Hello.  I installed the model and followed your setup directions, however when doing a test I got the following remark:

 

"No payment modules have been installed."

 

I am running 1.5.6.2

 

Please advise why this would occur.  I followed your readme.tx to the T.

 

Thanks,

Len

 

Hi Len,

Go to Modules. Search for Cryptocurrency module.

Does it show there? If it does, check that the module is installed. If the word "Install" on a button right of the module, it's not installed.

Install it, then search again for the module. Check it's activated. If not active, activate it.

Then press the "Configure" button (same as before, search for it).

Make sure you have the currencies you want created also.

Hope this helps you somehow! I installed and uninstalled the module several times and it works for me, but I need people to try it.

Thanks

Victor

Share this post


Link to post
Share on other sites

Easy. downloaded, added, installed, configured and tested! Thank you for this module!

 

Because we are only going to accept bitcoins, I would like to adjust it a little bit with text & graphics - hope you don't mind!

 

Hi there basskitchenrecords.com!

 

Thanks for testing the module. If you find any bug or problem let me know.

 

You can adjust everything you like of it, it's open software and based on a Prestashop module.

 

There are 2 logos inside the module folder (for bitcoin and dogegoin) but you can use another if you like.

 

Keep in mind the email templates, you must copy them in mails/{language code}, in your case the templates have been automatically copied to mails/en, but you must also copy them to mails/gb. You will also want to customize the templates and make some tests about how they are displayed to the customers.

 

Cheers

Share this post


Link to post
Share on other sites

Hi! It is easy to install and use, but: Is there any options to get more decimals only in Bitcoins?

I saw some tutorials to change this value, but they work for all currencies...

Share this post


Link to post
Share on other sites

Hi! It is easy to install and use, but: Is there any options to get more decimals only in Bitcoins?

I saw some tutorials to change this value, but they work for all currencies...

 

Hi Geek Irun, thanks for trying the module. I guess you could do it for all currencies and then hide the extra decimals on the other currencies. You could use css/javascript for that. Or you could change the Prestashop code to do that. Maybe finding the smarty template and adding a conditional there.

 

Show your shop and maybe me or somebody else can give you a solution :-)

Share this post


Link to post
Share on other sites

I'm just starting a new project and the shop I've installed is only with the demo DB, so I'm not the best tester...

I've no templates or anything rare installed, but I'm curious about BitCoins and I want to start selling online, but thank you for your interest.

 

If I can help you or be a tester, feel free to ask me and I will try anything you need ;-)

Share this post


Link to post
Share on other sites

Hello, I try today your module, thanxs for your work, but I've a small problem :

When I try a test payment, it start to work fine, but after click on "Place my order", I get the link :

index.php?fc=module&module=cryptocurrency&controller=validation

And the page stay empty, with noting.

 

I was using 1.5.3 or 1.5.4 prestashop, I've uprgraded to 1.5.6.2 and I've still the problem.

 

Sometime, I've the following error in a popup during 1 second :

 

1394316627-error.gif

 

 

Anyway, like you say  cryptocurrencies can have big fluctuations inconversion rates, so do you think it's possible to use this rate for auto-update coins values  http://coinmarketcap.com/ ?

Share this post


Link to post
Share on other sites

Where can i edit the picture and title of this module that shows on checkout page.

I only want to accept bitcoins so how can i change the title [PAY WITH A CRYPTOCURRENCY (ORDER PROCESS WILL BE LONGER)] and the icon logo with this title.

 

One thing more i want to do is, i want to change the decimal place to 4 or 5 for bitcoins (BTC) currency only. It is because i have almost all products on my store less then $10 USD and when bitcoins exchange the rate with USDs, the price shows like "$0.00" or "$0.01". I think it is possible to change the decimal numbers for specific currency. So let me know please how can i do it.

 

By the way your module is awesome and perfect for all those who have wallet other then bitpay. It is exactly i was looking for from last 3 days :) Thank you for your all efforts, it's really appreciable.

Share this post


Link to post
Share on other sites

Hello, I try today your module, thanxs for your work, but I've a small problem :

When I try a test payment, it start to work fine, but after click on "Place my order", I get the link :

index.php?fc=module&module=cryptocurrency&controller=validation

And the page stay empty, with noting.

 

I was using 1.5.3 or 1.5.4 prestashop, I've uprgraded to 1.5.6.2 and I've still the problem.

 

Sometime, I've the following error in a popup during 1 second :

 

1394316627-error.gif

 

 

Anyway, like you say  cryptocurrencies can have big fluctuations inconversion rates, so do you think it's possible to use this rate for auto-update coins values  http://coinmarketcap.com/ ?

 

Hi there,

sorry, I don't think I can replicate your error. Please try the "BankWire" module and check that it works ok, since this module is almost identical to BankWire.

 

And yes, you could addapt the module to check the price from coinarketcap. But you must edit the code. :-)

Share this post


Link to post
Share on other sites

Where can i edit the picture and title of this module that shows on checkout page.

I only want to accept bitcoins so how can i change the title [PAY WITH A CRYPTOCURRENCY (ORDER PROCESS WILL BE LONGER)] and the icon logo with this title.

 

One thing more i want to do is, i want to change the decimal place to 4 or 5 for bitcoins (BTC) currency only. It is because i have almost all products on my store less then $10 USD and when bitcoins exchange the rate with USDs, the price shows like "$0.00" or "$0.01". I think it is possible to change the decimal numbers for specific currency. So let me know please how can i do it.

 

By the way your module is awesome and perfect for all those who have wallet other then bitpay. It is exactly i was looking for from last 3 days :) Thank you for your all efforts, it's really appreciable.

 

Hi,

you must search inside the module folder, the images are there. You just need to replace them.

To add more decimals to prices check: http://www.prestashop.com/forums/topic/129753-how-to-add-more-decimals-to-unit-price-in-the-buy-block/

Then you can customize your .tpl files to "round" prices in other currencies, for example. However if you only want to sell in Bitcoins that won't be a problem.

The "Pay with cryptocurrency" text can be edited within the module. Just search for the string and replace it :-)

And you are welcome, thanks for trying the module. If you feel like helping the development, feel free to make a donation (in the config page of the module says how).

 

Cheers

Edited by vblanch

Share this post


Link to post
Share on other sites
LBM    0

Where can i edit the picture and title of this module that shows on checkout page.

I only want to accept bitcoins so how can i change the title [PAY WITH A CRYPTOCURRENCY (ORDER PROCESS WILL BE LONGER)] and the icon logo with this title.

 

One thing more i want to do is, i want to change the decimal place to 4 or 5 for bitcoins (BTC) currency only. It is because i have almost all products on my store less then $10 USD and when bitcoins exchange the rate with USDs, the price shows like "$0.00" or "$0.01". I think it is possible to change the decimal numbers for specific currency. So let me know please how can i do it.

 

By the way your module is awesome and perfect for all those who have wallet other then bitpay. It is exactly i was looking for from last 3 days :) Thank you for your all efforts, it's really appreciable.

Up please.

i don't have problem with Bank Wire module but with this yes. 

Share this post


Link to post
Share on other sites

Up please.

i don't have problem with Bank Wire module but with this yes. 

 

Hi LBM,

please tell me what's your problem with the module, so I can help you.

Cheers

Share this post


Link to post
Share on other sites

Hi,

 

i install the module on prestashop 1.6.0.6,  i follow all the steps for the installation but i try it on the website, on the final step i got a white page: http://lilbeats.com/fr/module/cryptocurrency/validation,

can you please tell me what to do, im gone use only bitcoin payment,

 

hope you can found a solution for it,

 

congratulation for this module i guess it very efficient :)

 

waiting for your reply,

 

brams

Share this post


Link to post
Share on other sites

Hi,

 

i install the module on prestashop 1.6.0.6,  i follow all the steps for the installation but i try it on the website, on the final step i got a white page: http://lilbeats.com/fr/module/cryptocurrency/validation,

can you please tell me what to do, im gone use only bitcoin payment,

 

hope you can found a solution for it,

 

congratulation for this module i guess it very efficient :)

 

waiting for your reply,

 

brams

 Hi there Brams,

the module is for 1.5 only. If I get enough support I will make the version for 1.6.

Cheers

Share this post


Link to post
Share on other sites

 Hi there Brams,

the module is for 1.5 only. If I get enough support I will make the version for 1.6.

Cheers

 

I Still Have Same Problem On New Version Please Update It

 

Thanks In Advance

Edited by Ptv2

Share this post


Link to post
Share on other sites

I have 1.6.0.9 and module from here works for my shop. I only needed to repack zip.

Cryptocurrency.zip:

   -cryptocurrency:

      1.controllers

      2.css

      3.img

      4.etc...

 

First added new currency which is BTC, then installed plugin, and it provides field for wallet number for each of my currencies. Great module, thanks vblanch!

Share this post


Link to post
Share on other sites

I have 1.6.0.9 and module from here works for my shop. I only needed to repack zip.

Cryptocurrency.zip:

   -cryptocurrency:

      1.controllers

      2.css

      3.img

      4.etc...

 

First added new currency which is BTC, then installed plugin, and it provides field for wallet number for each of my currencies. Great module, thanks vblanch!

 

Cool, I will try to repack the code and will try it on 1.6 :) Glad that it worked for you!

Share this post


Link to post
Share on other sites

Cool, I will try to repack the code and will try it on 1.6 :) Glad that it worked for you!

 

Hello, I repacked the zip but still getting the same results, blank page on checkout and settings do not get saved. Did you make any progress in getting it working for 1.6?

 

Apart from that, awesome module, keep it up!

Edited by dani43321

Share this post


Link to post
Share on other sites

Yes, I can help you.
First, decide if you're going to use multiple cryptocurrencies. If yes, it should work as it is, if you add at least 2 cryptocurrencies (for example bitcoin & litecoin) and configure module properly.
But, if you're going to use only one cryptocurrency, for example only bitcoin, parse error will brake your site on line 62 of /modules/cryptocurrency/controllers/front/validation.php.
Find this line.

'{wallet_address}' => nl2br(Configuration::get('CRYPTO_CURRENCY_ADDRESS')[$currency->id])


And change it to

 

'{wallet_address}' => nl2br(Configuration::get('CRYPTO_CURRENCY_ADDRESS'))

Make sure that currency restrictions for Cryptocurrency is checked only for one currency.

Let me know if this helped :)

Share this post


Link to post
Share on other sites

I have a problem with BTC autoupdate feature.

Turning dev mode on spawned this:

 

Warning: file_get_contents(https://blockchain.info/ticker) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.1 403 Forbidden in MY_ROOT/modules/cryptocurrency/cryptocurrency.php on line 495

Weird. This function works correctly on my localhost. My hosting company doesn't know about it.

Any ideas?

 

@edit 

alright, blockchain blocked my server's ip adress -.-

Do you know other resources which I can use?

Edited by khejit68

Share this post


Link to post
Share on other sites

I have a problem with BTC autoupdate feature.

Turning dev mode on spawned this:

Weird. This function works correctly on my localhost. My hosting company doesn't know about it.

Any ideas?

 

@edit 

alright, blockchain blocked my server's ip adress -.-

Do you know other resources which I can use?

 

Hi there khejit68,

you could try talking with the blockchain webmaster to unblock your IP address.

I don't know of any other resources you could use right now, but googling them shouldn't be too difficult. It might require tweaking the code though.

Good luck :)

Victor

Share this post


Link to post
Share on other sites

Hi there khejit68,

you could try talking with the blockchain webmaster to unblock your IP address.

I don't know of any other resources you could use right now, but googling them shouldn't be too difficult. It might require tweaking the code though.

Good luck :)

Victor

Hey,

thanks for the answer. I did as you suggested, now it all works :D

Found some other resources for lots of currencies, but it required tweaking and I'm lazy :D

 

During research I thought a little bit about multistore usage of this great module. Since it's updating currencies on page load it could be a problem if someone goes to checkout and during that time someone else loads page on second store, which uses different currency as default.

 

Look at my configuration:

 

2cpomyv.png

 

One of my stores uses PLN and BTC, the other uses EUR, USD and BTC.

For one PLN is default currency, EUR is default for the other, so exchange rate is for both PLN and EUR. You can see different exchange rate for BTC depending on id_shop, because I changed some code on very end of cryptocurrency.php:

//update conversion_rate in currency_shop table too
$curr_id = strval($btc_currency_id[0]['id_currency']);
$shop_id = Context::getContext()->shop->id;
$query2='UPDATE IGNORE `'._DB_PREFIX_.'currency_shop`
SET `conversion_rate` = \''.$rate_default_str.'\'
WHERE `id_currency`=\''.$curr_id.'\' AND `id_shop`=\''.$shop_id.'\'';

$return = Db::getInstance()->Execute($query2);

This handles different exchange rates in ps_currency_shop table, but I'm worried about ps_currency.

Do you think this way is good for handling my problem, vblanch? Or maybe my configuration is bad and I shouldn't do different currencies as default for different shops?

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

×