PayPal记录: 默认不显示webhooks的

master
Lei OT 2 years ago
parent 3b266c537d
commit 31a414ac52

@ -55,12 +55,13 @@ class Note_model extends CI_Model {
public function notestatus($topnum = 2, $status = '') { public function notestatus($topnum = 2, $status = '') {
$this->init(); $this->init();
$this->topnum = $topnum; $this->topnum = $topnum;
$sql = " AND pn_memo NOT LIKE '{\"id\":\"WH-%' ";
$x_status = strtolower($status) === 'reversal' ? 'revers' : $status; $x_status = strtolower($status) === 'reversal' ? 'revers' : $status;
$sql1 = in_array(strtolower($status), ["completed", 'pending']) ? " AND (pn_payment_status='$status' ) " : ""; $sql1 = in_array(strtolower($status), ["completed", 'pending']) ? " AND (pn_payment_status='$status' ) " : "";
$sql2 = in_array(strtolower($status), ["refunded", "reversal"]) ? " AND (pn_payment_status like '%$x_status%' ) " : ""; $sql2 = in_array(strtolower($status), ["refunded", "reversal"]) ? " AND (pn_payment_status like '%$x_status%' ) " : "";
$sql3 = in_array(strtolower($status), ["others"]) ? " AND (pn_payment_status='failed' OR pn_payment_status='denied' ) " : ""; $sql3 = in_array(strtolower($status), ["others"]) ? " AND (pn_payment_status='failed' OR pn_payment_status='denied' ) " : "";
$sql4 = in_array(strtolower($status), ["case"]) ? " AND (pn_memo like '{\"txn_type\":\"new_case\"%' AND pn_mc_gross = '0' ) " : ""; $sql4 = in_array(strtolower($status), ["case"]) ? " AND (pn_memo like '{\"txn_type\":\"new_case\"%' AND pn_mc_gross = '0' ) " : "";
$this->pn_send = $sql1 . $sql2 . $sql3 . $sql4; $this->pn_send = $sql1 . $sql2 . $sql3 . $sql4 . $sql;
// $this->orderby=" ORDER BY pn_payment_date DESC, pn.pn_sn ASC "; // $this->orderby=" ORDER BY pn_payment_date DESC, pn.pn_sn ASC ";
$this->orderby=" ORDER BY CASE pn.pn_send WHEN 'sendfail' THEN 1 ELSE 2 END ,pn.pn_sn DESC "; $this->orderby=" ORDER BY CASE pn.pn_send WHEN 'sendfail' THEN 1 ELSE 2 END ,pn.pn_sn DESC ";
return $this->get_list(); return $this->get_list();
@ -77,10 +78,10 @@ class Note_model extends CI_Model {
public function search_date($date) { public function search_date($date) {
$this->init(); $this->init();
$search_sql = " AND (pn.pn_datetime BETWEEN '$date 00:00:00' AND '$date 23:59:59' OR isnull(pn_send,'') in ('sendfail','unsend','')) "; $search_sql = " AND (pn.pn_datetime BETWEEN '$date 00:00:00' AND '$date 23:59:59' OR isnull(pn_send,'') in ('sendfail','unsend','')) AND pn_memo NOT LIKE '{\"id\":\"WH-%' "; // {"id":"WH-
$this->search = $search_sql; $this->search = $search_sql;
// $this->orderby=" ORDER BY CASE pn.pn_send WHEN 'sendfail' THEN 1 ELSE 2 END ,pn.pn_sn DESC "; // $this->orderby=" ORDER BY CASE pn.pn_send WHEN 'sendfail' THEN 1 ELSE 2 END ,pn.pn_sn DESC ";
$this->orderby=" ORDER BY CASE WHEN pn.pn_send='sendfail' AND pn.pn_payment_status='Completed' THEN 1 ELSE 9 END ,pn.pn_sn DESC "; $this->orderby=" ORDER BY CASE WHEN pn.pn_send='sendfail' AND pn.pn_payment_status='Completed' THEN 1 WHEN pn.pn_send = 'sendfail' THEN 2 ELSE 9 END ,pn.pn_sn DESC ";
// WHEN pn.pn_send = 'sendfail' THEN 2 // WHEN pn.pn_send = 'sendfail' THEN 2
return $this->get_list(); return $this->get_list();

Loading…
Cancel
Save