mirror of
https://git.wownero.com/wownero/wownerowp.git
synced 2024-08-15 01:03:16 +00:00
payment verification fixes
This commit is contained in:
parent
b519522899
commit
309b141477
1 changed files with 7 additions and 2 deletions
|
@ -8,7 +8,7 @@
|
||||||
|
|
||||||
class Monero_Gateway extends WC_Payment_Gateway
|
class Monero_Gateway extends WC_Payment_Gateway
|
||||||
{
|
{
|
||||||
private $reloadTime = 30000;
|
private $reloadTime = 17000;
|
||||||
private $discount;
|
private $discount;
|
||||||
private $confirmed = false;
|
private $confirmed = false;
|
||||||
private $monero_daemon;
|
private $monero_daemon;
|
||||||
|
@ -325,7 +325,7 @@ class Monero_Gateway extends WC_Payment_Gateway
|
||||||
$uri = "monero:$address?tx_payment_id=$payment_id";
|
$uri = "monero:$address?tx_payment_id=$payment_id";
|
||||||
|
|
||||||
if($this->zero_confirm){
|
if($this->zero_confirm){
|
||||||
$this->verify_zero_conf($payment_id, $amount, $order_id);
|
$this->verify_zero_conf($payment_id, $amount_xmr2, $order_id);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
$this->verify_non_rpc($payment_id, $amount_xmr2, $order_id);
|
$this->verify_non_rpc($payment_id, $amount_xmr2, $order_id);
|
||||||
|
@ -693,10 +693,15 @@ class Monero_Gateway extends WC_Payment_Gateway
|
||||||
if(isset($output_found))
|
if(isset($output_found))
|
||||||
{
|
{
|
||||||
$amount_atomic_units = $amount * 1000000000000;
|
$amount_atomic_units = $amount * 1000000000000;
|
||||||
|
|
||||||
if($txs_from_block[$block_index]['payment_id'] == $payment_id && $output_found['amount'] >= $amount_atomic_units)
|
if($txs_from_block[$block_index]['payment_id'] == $payment_id && $output_found['amount'] >= $amount_atomic_units)
|
||||||
{
|
{
|
||||||
$this->on_verified($payment_id, $amount_atomic_units, $order_id);
|
$this->on_verified($payment_id, $amount_atomic_units, $order_id);
|
||||||
}
|
}
|
||||||
|
if($txs_from_block_2[$block_index]['payment_id'] == $payment_id && $output_found['amount'] >= $amount_atomic_units)
|
||||||
|
{
|
||||||
|
$this->on_verified($payment_id, $amount_atomic_units, $order_id);
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue