mirror of
https://git.wownero.com/wownero/wownerowp.git
synced 2024-08-15 01:03:16 +00:00
Merge pull request #41 from cryptochangements34/master
Check if payment id is set first
This commit is contained in:
commit
6b43b53cfe
1 changed files with 15 additions and 7 deletions
|
@ -312,10 +312,15 @@ class Monero_Gateway extends WC_Payment_Gateway
|
||||||
}
|
}
|
||||||
$uri = "monero:$address?amount=$amount?payment_id=$payment_id";
|
$uri = "monero:$address?amount=$amount?payment_id=$payment_id";
|
||||||
|
|
||||||
if($this->verify_non_rpc($payment_id, $amount_xmr2, $order_id) == false);
|
$this->verify_non_rpc($payment_id, $amount_xmr2, $order_id);
|
||||||
|
if($this->confirmed == false)
|
||||||
{
|
{
|
||||||
echo "<h4> We are waiting for your transaction to be confirmed </h4>";
|
echo "<h4> We are waiting for your transaction to be confirmed </h4>";
|
||||||
}
|
}
|
||||||
|
if($this->confirmed)
|
||||||
|
{
|
||||||
|
echo "<h4> Your transaction has been successfully confirmed! </h4>";
|
||||||
|
}
|
||||||
|
|
||||||
echo "
|
echo "
|
||||||
<head>
|
<head>
|
||||||
|
@ -608,6 +613,8 @@ class Monero_Gateway extends WC_Payment_Gateway
|
||||||
while($i <= $tx_count)
|
while($i <= $tx_count)
|
||||||
{
|
{
|
||||||
$tx_hash = $txs_from_block[$i]['tx_hash'];
|
$tx_hash = $txs_from_block[$i]['tx_hash'];
|
||||||
|
if(strlen($txs_from_block[$i]['payment_id']) != 0)
|
||||||
|
{
|
||||||
$result = $tools->check_tx($tx_hash, $this->address, $this->viewKey);
|
$result = $tools->check_tx($tx_hash, $this->address, $this->viewKey);
|
||||||
if($result)
|
if($result)
|
||||||
{
|
{
|
||||||
|
@ -615,6 +622,7 @@ class Monero_Gateway extends WC_Payment_Gateway
|
||||||
$block_index = $i;
|
$block_index = $i;
|
||||||
$i = $tx_count; // finish loop
|
$i = $tx_count; // finish loop
|
||||||
}
|
}
|
||||||
|
}
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
if(isset($output_found))
|
if(isset($output_found))
|
||||||
|
|
Loading…
Reference in a new issue