Version 0.9 - ready for testing
This commit is contained in:
parent
89d4f1bdca
commit
e721f97c83
3 changed files with 345 additions and 293 deletions
|
@ -20,12 +20,11 @@ class Submenu_Page {
|
||||||
public $_nrows;
|
public $_nrows;
|
||||||
public $_path;
|
public $_path;
|
||||||
|
|
||||||
function __construct( ) {
|
public function __construct( $path ) {
|
||||||
|
|
||||||
global $wpdb;
|
global $wpdb;
|
||||||
|
|
||||||
$this->_path = $path;
|
$this->_path = $path;
|
||||||
$this->console_log('$_path -> '. $this->_path);
|
|
||||||
|
|
||||||
$this->_nrows = $this->getPmtsCount();
|
$this->_nrows = $this->getPmtsCount();
|
||||||
//
|
//
|
||||||
// Create zgo_pmtlst if does not exist
|
// Create zgo_pmtlst if does not exist
|
||||||
|
@ -109,9 +108,8 @@ class Submenu_Page {
|
||||||
|
|
||||||
public function console_log($data) {
|
public function console_log($data) {
|
||||||
|
|
||||||
$file = $this->_path . 'zgopmtgwy/assets/console.log';
|
$file = $this->_path . 'assets/log/console.log';
|
||||||
file_put_contents($file, 'LST::' . $data . chr(0x0D) . chr(0x0A), FILE_TEXT | FILE_APPEND | LOCK_EX );
|
file_put_contents($file, 'LST::' . $data . chr(0x0D) . chr(0x0A), FILE_TEXT | FILE_APPEND | LOCK_EX );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function render() {
|
public function render() {
|
||||||
|
@ -361,13 +359,15 @@ class Submenu_Page {
|
||||||
</td>
|
</td>
|
||||||
<td width="10%"></td>
|
<td width="10%"></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
<td width="10%"></td>
|
<td width="10%"></td>
|
||||||
<td width="80%" >
|
<td width="80%" >
|
||||||
<table width="100%">
|
<table width="100%">
|
||||||
<tr style="font-family: Noto Sans;
|
<tr style="font-family: Noto Sans;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
background-color: white;">
|
background-color: white;">
|
||||||
<td width="35%" style="padding-left: 10px;
|
<td width="35%"
|
||||||
|
style="padding-left: 10px;
|
||||||
border-top: 1px solid navy;
|
border-top: 1px solid navy;
|
||||||
border-bottom: 1px solid navy;">Received Today</td>
|
border-bottom: 1px solid navy;">Received Today</td>
|
||||||
<td width="35%">
|
<td width="35%">
|
||||||
|
@ -402,24 +402,39 @@ class Submenu_Page {
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="border-top: 1px solid navy;
|
<td style="border-top: 1px solid navy;
|
||||||
padding-left: 10px;"> <?php if ($result->dTotalZec > 0.0) {
|
padding-left: 10px;">
|
||||||
|
<?php
|
||||||
|
if ($result->dTotalZec > 0.0) {
|
||||||
echo number_format($result->dTotalZec/$result->dTotalAmount,2);
|
echo number_format($result->dTotalZec/$result->dTotalAmount,2);
|
||||||
} else { echo '0.00'; } ?></td>
|
} else {
|
||||||
|
echo '0.00';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="border-top: 1px solid navy;
|
<td style="border-top: 1px solid navy;
|
||||||
padding-left: 10px;"><?php echo number_format($result->dTotalZec,8);?></td>
|
padding-left: 10px;">
|
||||||
|
<?php
|
||||||
|
echo number_format($result->dTotalZec,8);
|
||||||
|
?>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr >
|
<tr >
|
||||||
<td style="border-top: 1px solid navy;
|
<td style="border-top: 1px solid navy;
|
||||||
padding-left: 10px;"><?php echo $result->dTotalPmts;?></td>
|
padding-left: 10px;">
|
||||||
|
<?php
|
||||||
|
echo $result->dTotalPmts;
|
||||||
|
?>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr style="font-family: Noto Sans;
|
<tr style="font-family: Noto Sans;
|
||||||
font-weight: 600;">
|
font-weight: 600;">
|
||||||
<td width="35%" style="padding-left: 10px;
|
<td width="35%"
|
||||||
|
style="padding-left: 10px;
|
||||||
border-top: 1px solid navy;
|
border-top: 1px solid navy;
|
||||||
border-bottom: 1px solid navy;">Last 7 days</td>
|
border-bottom: 1px solid navy;">Last 7 days</td>
|
||||||
<td width="35%">
|
<td width="35%">
|
||||||
|
@ -450,21 +465,39 @@ class Submenu_Page {
|
||||||
border-bottom: 1px solid navy;
|
border-bottom: 1px solid navy;
|
||||||
border-collapse: collapse;">
|
border-collapse: collapse;">
|
||||||
<tr>
|
<tr>
|
||||||
<td style="padding-left: 10px;"> <?php echo number_format($result->wTotalAmount,2);?></td>
|
<td style="padding-left: 10px;">
|
||||||
|
<?php
|
||||||
|
echo number_format($result->wTotalAmount,2);
|
||||||
|
?>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="border-top: 1px solid navy;
|
<td style="border-top: 1px solid navy;
|
||||||
padding-left: 10px;"> <?php if ($result->wTotalZec > 0.0) {
|
padding-left: 10px;">
|
||||||
|
<?php
|
||||||
|
if ($result->wTotalZec > 0.0) {
|
||||||
echo number_format($result->wTotalAmount/$result->wTotalZec,2);
|
echo number_format($result->wTotalAmount/$result->wTotalZec,2);
|
||||||
} else { echo '0.00'; } ?></td>
|
} else {
|
||||||
|
echo '0.00';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="border-top: 1px solid navy;
|
<td style="border-top: 1px solid navy;
|
||||||
padding-left: 10px;"><?php echo number_format($result->wTotalZec,8);?></td>
|
padding-left: 10px;">
|
||||||
|
<?php
|
||||||
|
echo number_format($result->wTotalZec,8);
|
||||||
|
?>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr >
|
<tr >
|
||||||
<td style="border-top: 1px solid navy;
|
<td style="border-top: 1px solid navy;
|
||||||
padding-left: 10px;"><?php echo $result->wTotalPmts;?></td>
|
padding-left: 10px;">
|
||||||
|
<?php
|
||||||
|
echo $result->wTotalPmts;
|
||||||
|
?>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
|
@ -474,7 +507,8 @@ class Submenu_Page {
|
||||||
background-color: white;">
|
background-color: white;">
|
||||||
<td width="35%" style="padding-left: 10px;
|
<td width="35%" style="padding-left: 10px;
|
||||||
border-top: 1px solid navy;
|
border-top: 1px solid navy;
|
||||||
border-bottom: 1px solid navy;">Last 30 days</td>
|
border-bottom: 1px solid navy;">Last 30 days
|
||||||
|
</td>
|
||||||
<td width="35%">
|
<td width="35%">
|
||||||
<table width="100%"
|
<table width="100%"
|
||||||
style="border-top: 1px solid navy;
|
style="border-top: 1px solid navy;
|
||||||
|
@ -503,21 +537,39 @@ class Submenu_Page {
|
||||||
border-bottom: 1px solid navy;
|
border-bottom: 1px solid navy;
|
||||||
border-collapse: collapse;">
|
border-collapse: collapse;">
|
||||||
<tr>
|
<tr>
|
||||||
<td style="padding-left: 10px;"> <?php echo number_format($result->mTotalAmount,2);?></td>
|
<td style="padding-left: 10px;">
|
||||||
|
<?php
|
||||||
|
echo number_format($result->mTotalAmount,2);
|
||||||
|
?>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="border-top: 1px solid navy;
|
<td style="border-top: 1px solid navy;
|
||||||
padding-left: 10px;"> <?php if ($result->mTotalZec> 0.0) {
|
padding-left: 10px;">
|
||||||
|
<?php
|
||||||
|
if ($result->mTotalZec> 0.0) {
|
||||||
echo number_format($result->mTotalAmount/$result->mTotalZec,2);
|
echo number_format($result->mTotalAmount/$result->mTotalZec,2);
|
||||||
} else { echo '0.00'; } ?></td>
|
} else {
|
||||||
|
echo '0.00';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="border-top: 1px solid navy;
|
<td style="border-top: 1px solid navy;
|
||||||
padding-left: 10px;"><?php echo number_format($result->mTotalZec,8);?></td>
|
padding-left: 10px;">
|
||||||
|
<?php
|
||||||
|
echo number_format($result->mTotalZec,8);
|
||||||
|
?>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr >
|
<tr >
|
||||||
<td style="border-top: 1px solid navy;
|
<td style="border-top: 1px solid navy;
|
||||||
padding-left: 10px;"><?php echo $result->mTotalPmts;?></td>
|
padding-left: 10px;">
|
||||||
|
<?php
|
||||||
|
echo $result->mTotalPmts;
|
||||||
|
?>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
|
@ -525,8 +577,6 @@ class Submenu_Page {
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
<td width="10%"></td>
|
<td width="10%"></td>
|
||||||
<tr>
|
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<?php
|
<?php
|
||||||
|
@ -566,7 +616,7 @@ class Submenu_Page {
|
||||||
vertical-align: center;
|
vertical-align: center;
|
||||||
height: 20px;
|
height: 20px;
|
||||||
background-color: #ff5722;
|
background-color: #ff5722;
|
||||||
color: white;">
|
git color: white;">
|
||||||
<td width="12%">Payments:</td>
|
<td width="12%">Payments:</td>
|
||||||
<td width="23%"><?php echo $result->gTotalPmts ?></td>
|
<td width="23%"><?php echo $result->gTotalPmts ?></td>
|
||||||
<td width="12%">Total Amount:</td>
|
<td width="12%">Total Amount:</td>
|
||||||
|
@ -581,6 +631,5 @@ class Submenu_Page {
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
*** Changelog ***
|
*** Changelog ***
|
||||||
# ZGo Payment Plugin for WooCommerce
|
# ZGo Payment Plugin for WooCommerce
|
||||||
|
|
||||||
|
## Version 0.9 - 2022-12-30
|
||||||
|
Integrate ZGo Payments Monitor
|
||||||
|
|
||||||
## Version 0.8 - 2022-12-26
|
## Version 0.8 - 2022-12-26
|
||||||
ZGo's WooCommerce backend API in test mode
|
ZGo's WooCommerce backend API in test mode
|
||||||
Set licence to GPL v2 or later
|
Set licence to GPL v2 or later
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* Plugin Name: ZGo Payment Gateway
|
* Plugin Name: ZGo Payment Gateway
|
||||||
* Plugin URI: https://vergara.tech'
|
* Plugin URI: https://vergara.tech'
|
||||||
* Description: ZGo latest payment processing solution for Woocommerce. Accept payments using Zcash.
|
* Description: ZGo latest payment processing solution for Woocommerce. Accept payments using Zcash.
|
||||||
* Version: 0.8a
|
* Version: 0.9
|
||||||
* Requires at least: 5.2
|
* Requires at least: 5.2
|
||||||
* Requires PHP: 7.2
|
* Requires PHP: 7.2
|
||||||
* Author: Vergara Tech LLC
|
* Author: Vergara Tech LLC
|
||||||
|
@ -420,8 +420,8 @@ foreach ( glob( plugin_dir_path( __FILE__ ) . 'assets/php/*.php' ) as $file ) {
|
||||||
|
|
||||||
add_action( 'plugins_loaded', 'zgopmtlist_plugin' );
|
add_action( 'plugins_loaded', 'zgopmtlist_plugin' );
|
||||||
function zgopmtlist_plugin() {
|
function zgopmtlist_plugin() {
|
||||||
|
$path = plugin_dir_path( __FILE__ );
|
||||||
$plugin = new Submenu( new Submenu_Page() );
|
$plugin = new Submenu( new Submenu_Page($path) );
|
||||||
$plugin->init();
|
$plugin->init();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue