Compare commits
No commits in common. "main" and "1.0.1" have entirely different histories.
3 changed files with 17 additions and 30 deletions
|
@ -3,10 +3,6 @@ All notable changes to this project will be documented in this file.
|
|||
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [1.0.2] - 2023-07-20
|
||||
|
||||
- Fixed typo in API call
|
||||
|
||||
## [1.0.1] - 2023-06-26
|
||||
|
||||
- Updates for production release
|
||||
|
|
|
@ -46,13 +46,11 @@ class zpmt_stats_page {
|
|||
$this->_npages++;
|
||||
}
|
||||
|
||||
// $sql = 'insert into zgo_pmtlst (pg_ix,pg_page,pg_npages,pg_offset,pg_limit) values (1,' .
|
||||
// $this->_page . ',' .
|
||||
// $this->_npages . ',' .
|
||||
// $this->_offset . ',' .
|
||||
// $this->_limit .')';
|
||||
|
||||
$sql = $wpdb->prepare('insert into zgo_pmtlst (pg_ix,pg_page,pg_npages,pg_offset,pg_limit) values (1,%d,%d,%d,%d);',$this->_page,$this->_npages,$this->_offset,$this->_limit);
|
||||
$sql = 'insert into zgo_pmtlst (pg_ix,pg_page,pg_npages,pg_offset,pg_limit) values (1,' .
|
||||
$this->_page . ',' .
|
||||
$this->_npages . ',' .
|
||||
$this->_offset . ',' .
|
||||
$this->_limit .')';
|
||||
$wpdb->query($sql);
|
||||
} else {
|
||||
// Load last state
|
||||
|
@ -69,10 +67,7 @@ class zpmt_stats_page {
|
|||
if ( $this->_nrows > ($this->_npages*$this->_limit) ) {
|
||||
$this->_npages++;
|
||||
}
|
||||
|
||||
// $sql = 'update zgo_pmtlst set pg_npages=' . $this->_npages . ' where pg_ix=1';
|
||||
|
||||
$sql = $wpdb->prepare('update zgo_pmtlst set pg_npages=%d where pg_ix=1;',$this->_npages);
|
||||
$sql = 'update zgo_pmtlst set pg_npages=' . $this->_npages . ' where pg_ix=1';
|
||||
$wpdb->query($sql);
|
||||
}
|
||||
}
|
||||
|
@ -154,13 +149,9 @@ class zpmt_stats_page {
|
|||
//
|
||||
// Save new list state
|
||||
//
|
||||
|
||||
// $sql = 'update zgo_pmtlst set pg_page=' . $this->_page .
|
||||
// ', pg_npages=' . $this->_npages .
|
||||
// ', pg_offset=' . $this->_offset . ' where pg_ix=1;';
|
||||
|
||||
$sql = $wpdb->prepare('update zgo_pmtlst set pg_page=%d, pg_npages=
|
||||
%d, pg_offset=%d where pg_ix=1;',$this->_page,$this->_npages,$this->_offset);
|
||||
$sql = 'update zgo_pmtlst set pg_page=' . $this->_page .
|
||||
', pg_npages=' . $this->_npages .
|
||||
', pg_offset=' . $this->_offset . ' where pg_ix=1;';
|
||||
$wpdb->query($sql);
|
||||
}
|
||||
|
||||
|
@ -242,14 +233,14 @@ class zpmt_stats_page {
|
|||
}
|
||||
$line++;
|
||||
print '<td><a href="https://dev.zgo.cash/invoice/' . htmlentities($row->pmt_orderid, ENT_QUOTES) . '" target="_blank">' . htmlentities($row->pmt_orderid, ENT_QUOTES) . "</a></td>";
|
||||
print "<td>" . htmlwntities($row->pmt_wc_order,ENT_QUOTES) . "</td>";
|
||||
print "<td>" . $row->pmt_wc_order . "</td>";
|
||||
print "<td>" . htmlentities($row->pmt_wc_custname, ENT_QUOTES) . "</td>";
|
||||
print '<td style="text-align:center;">'. htmlentities($row->pmt_accepted,ENT_QUOTES) . "</td>";
|
||||
print '<td style="text-align:center;">'.htmlentities($row->pmt_confirmed,ENT_QUOTES) ."</td>";
|
||||
print '<td style="text-align:center;">'. $row->pmt_accepted . "</td>";
|
||||
print '<td style="text-align:center;">'.$row->pmt_confirmed ."</td>";
|
||||
print '<td style="text-align:right;">'. number_format($row->pmt_amount,2) . "</td>";
|
||||
print '<td style="text-align:right;">'. number_format($row->pmt_rate,2) . "</td>";
|
||||
print '<td style="text-align:right;">'. number_format($row->pmt_zec,8) . "</td>";
|
||||
print '<td style="text-align:center;">'. htmlentities($row->pmt_wc_paid,ENT_QUOTES) ."</td></tr>";
|
||||
print '<td style="text-align:center;">'.$row->pmt_wc_paid ."</td></tr>";
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
|
@ -586,8 +577,8 @@ class zpmt_stats_page {
|
|||
global $wpdb;
|
||||
|
||||
$sql = 'select ifnull(sum(a.pmt_amount),0) as gTotalAmount, ' .
|
||||
'ifnull(count(*),0) as gTotalPmts, ' .
|
||||
'ifnull(sum(a.pmt_zec),0) as gTotalZec ' .
|
||||
'ifnull(count(*),0) as gTotalPmts, ' .
|
||||
'ifnull(sum(a.pmt_zec),0) as gTotalZec ' .
|
||||
'from zgo_payments a ' .
|
||||
'where a.pmt_wc_paid = 1;' ;
|
||||
$result = $wpdb->get_row($sql,OBJECT);
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* Plugin Name: ZGo Payment Gateway
|
||||
* Plugin URI: https://zgo.cash/
|
||||
* Description: ZGo latest payment processing solution for Woocommerce. Accept payments using Zcash.
|
||||
* Version: 1.1.1
|
||||
* Version: 1.0.1
|
||||
* Requires at least: 5.2
|
||||
* Requires PHP: 7.2
|
||||
* Author: Vergara Tech LLC
|
||||
|
@ -220,7 +220,7 @@ function zgopmt_init() {
|
|||
$wc_order_key = $order->get_order_key();
|
||||
|
||||
|
||||
$url = 'https://api.zgo.cash/woopayment' .
|
||||
$url = 'https://test.zgo.cash/woopayment' .
|
||||
'?ownerid=' . $this->zgoownerid .
|
||||
'&token=' . $this->zgotoken .
|
||||
'&order_id=' . $order_id .
|
||||
|
|
Loading…
Reference in a new issue