monero-integrations / monerowp

Monero WooCommerce Plugin for Wordpress
MIT License
105 stars 74 forks source link

converting price error??? #99

Closed ghost closed 3 years ago

ghost commented 3 years ago

I ran monero wallet rpc with

"monero-wallet-rpc.exe --daemon-address xmr.getmonero.us:18081 --rpc-bind-port 18083 --wallet-file --password --disable-rpc-login"

and then i installed this plugin and connected to wordpress well.

but when i try to check out sample product, it is displaying

"Payment error:The price for Monero could not be retrieved. Please contact the merchant."

My host OS is window 10 pro. and I tested in MAMP. I would appreciate if you help me.

Have a good day

serhack commented 3 years ago

Hi, thanks for having filled an issue for MoneroWP project. Would you mind if I ask you to check a few things?

That error is given when the price is set to 0. In that particular situation, Woocommerce marks the order as paid by default then I introduced the error to prevent that case.

serhack commented 3 years ago

How can I check to reach coingecko-api?? cURL is enabled and It seems that there are no problem in that table.

If you have direct access (SSH or Telnet) for that machine, you could try to ping Coingecko API (via ping 104.18.5.127). Since the service is proxied through Cloudflare, I wonder.. Is the machine on Tor network? Cloudflare can add a captcha or deny any connections from Tor.

If you're on shared hosting (such as GoDaddy, Namecheap and etc..), please note that your hosting provider might have blocked any external connection.

serhack commented 3 years ago

I can reach coingecko-api. But still doesn't work. And whenever I check the option 'Show Prices in Monero', products price turn into '0.000000000000 XMR'.....

Is this a problem because it's not linux or problem with the rpc settings?

It should not be since the payment gateway tries to fetch prices independently of the option chosen in the settings IIRC. I need to dig into this. Could you please check Woocommerce Logs?

serhack commented 3 years ago

This error is shown only if the $price response is not set. This might happen for many reasons (cURL and JSON extensions must be enabled, CoinGecko API must return something). Excluding Coingecko API and the extensions, I do not know what it could cause that. Is there any particular configuration that you used to install Wordpress and I'm not aware of?

ghost commented 3 years ago

I changed my mysql port(8889 -> 3306) and it was solved!

serhack commented 3 years ago

Glad it worked by changing the MySQL port.