Various Problems
-
Great plugin. I’m using it on my website. However I had to fix a number of fairly serious problems to make it usuable:
1) The QR code images get cached by the browser, so if for some reason a user generates an order, navigates away then generates another, they will get served the same qr code image. This could lead to problems. I fixed this by forcing no cache on the image, but it would be much better and safer to generate a unique filename for each qr image. This would also prevent the problem caused by a user refreshing the payment page and getting served someone else’s qr because the image file has been changed by a new order.
2) The USD currency exchange is completely broken. The feed is in EUR not USD as a base currency, meaning that if you are not pricing in USD, the crypto total generated is consistently out (at the moment) by about 12% regardless of which base currency / crypto you are using. You can use https://www.floatrates.com/daily/…. instead. I’ve fixed mine by using this. currencyconverterapi is broken and data.fixer.io bases in euros, making both unusable.
3) I changed NMM_Cryptocurrencies so that ethereum prices are only 8 decimal places long. 18 decimal places, while not incorrect, looks really bad for the user. Better have only 8.
4) NMM_Payment causes wp-cron to crash if it tries to delete an order which was already deleted in the user admin interface. I fixed it by adding try/catch as follows:
try // ER – this wrecks the cron unless it is try/catched
{
$order = new WC_Order($orderId);
…………………
}
catch (\Exception $e) {
// ER – probably because admin deleted the order
}
- The topic ‘Various Problems’ is closed to new replies.