mirror of
https://git.wownero.com/wownero/wownerowp.git
synced 2024-08-15 01:03:16 +00:00
Fix cookie protection
This commit is contained in:
parent
a9478e4ae4
commit
6f9075573f
1 changed files with 1 additions and 1 deletions
|
@ -165,7 +165,7 @@ class Monero_Gateway extends WC_Payment_Gateway
|
||||||
{
|
{
|
||||||
$rate_cookie = $_COOKIE['rate'];
|
$rate_cookie = $_COOKIE['rate'];
|
||||||
$xmr_live_price = $this->retriveprice($currency);
|
$xmr_live_price = $this->retriveprice($currency);
|
||||||
if($xmr_live_price - $rate_cookie <= 1) //reset rate if there is a difference of 1 EURO/DOLLAR/ETC between the live rate and the cookie rate
|
if($xmr_live_price - $rate_cookie >= 1) //reset rate if there is a difference of 1 EURO/DOLLAR/ETC between the live rate and the cookie rate
|
||||||
{ //this is so that the merchant does not lose money from exchange market forces or cookie tampering
|
{ //this is so that the merchant does not lose money from exchange market forces or cookie tampering
|
||||||
$new_amount = $amount / $rate_cookie;
|
$new_amount = $amount / $rate_cookie;
|
||||||
$rounded_amount = round($new_amount, 12);
|
$rounded_amount = round($new_amount, 12);
|
||||||
|
|
Loading…
Reference in a new issue