mirror of
https://github.com/wownero/wownerowp.git
synced 2026-10-22 01:48:35 +02:00
Add colors
This commit is contained in:
committed by
GitHub
parent
2c727772f7
commit
02bd398bbb
@@ -4,6 +4,7 @@ class Monero_Gateway extends WC_Payment_Gateway
|
||||
{
|
||||
private $reloadTime = 30000;
|
||||
private $discount;
|
||||
private $confirmed = false;
|
||||
private $monero_daemon;
|
||||
function __construct()
|
||||
{
|
||||
@@ -301,6 +302,12 @@ public function add_my_currency_symbol( $currency_symbol, $currency ) {
|
||||
$integrated_address = $address;
|
||||
}
|
||||
$message = $this->verify_payment($payment_id, $amount_xmr2, $order);
|
||||
if($this->confirmed){
|
||||
$color = "006400";
|
||||
}
|
||||
else{
|
||||
$color = "DC143C";
|
||||
}
|
||||
echo "<h4>".$message."</h4>";
|
||||
echo "<link rel='stylesheet' href='https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css'>";
|
||||
|
||||
@@ -376,11 +383,11 @@ public function add_my_currency_symbol( $currency_symbol, $currency ) {
|
||||
$get_payments_method = $this->monero_daemon->get_payments($payment_id);
|
||||
if(isset($get_payments_method['result']["payments"]["0"]["amount"]))
|
||||
{
|
||||
if($get_payments_method['result']["payments"][0]["amount"] >= $amount_atomic_units)
|
||||
if($get_payments_method["payments"][0]["amount"] >= $amount_atomic_units)
|
||||
{
|
||||
$message = "Payment has been received and confirmed. Thanks!";
|
||||
$this->log->add('Monero_gateway','[SUCCESS] Payment has been recorded. Congrats!');
|
||||
$paid = true;
|
||||
$this->confirmed = true;
|
||||
$order = wc_get_order($order_id);
|
||||
$order->update_status('completed', __('Payment has been received', 'monero_gateway'));
|
||||
global $wpdb;
|
||||
|
||||
Reference in New Issue
Block a user