joaodealmeida / woocommerce-gateway-lightning

Plugin to accept Bitcoin Lightning payments at WooCommerce stores, using LND.
MIT License
38 stars 10 forks source link

Implements other fiat currencies #5

Closed grunch closed 3 years ago

grunch commented 6 years ago

Currently only works with USD fiat currency, with this fix the plugin works with the fiat currency indicated by the admin via settings

joaodealmeida commented 6 years ago

Not sure if bitcoinaverage API accepts all fiat currencies at this point.

grunch commented 6 years ago

I'm currently using it with argentinian pesos (ARS) and it works perfectly

joaodealmeida commented 6 years ago

But we need some kind of error handling if a certain currency is not accepted by bitcoinaverage's ticker method.

leblitzdick commented 6 years ago

In order to calculate correctly other currencies, you should set the variable ticker to the desired value in Lnd_wrapper.php in function getLivePrice () - for me that would be BTCEUR and LTCEUR - not very elegant but works for me...

joaodealmeida commented 6 years ago

@leblitzdick I haven't had the time I wanted to work on this project. Feel free to push a PR with those changes and I'll happily accept it.