From 9ef932c148a1c6592981fd9d98f759f96ab3cb46 Mon Sep 17 00:00:00 2001 From: Lei OT Date: Tue, 19 Dec 2023 13:46:54 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20PayPal:=20=E5=B7=B2=E5=AE=8C=E6=88=90?= =?UTF-8?q?=E7=9A=84pending?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- webht/third_party/paypal/controllers/index.php | 2 ++ webht/third_party/paypal/models/note_model.php | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/webht/third_party/paypal/controllers/index.php b/webht/third_party/paypal/controllers/index.php index 2f640a6a..75657969 100644 --- a/webht/third_party/paypal/controllers/index.php +++ b/webht/third_party/paypal/controllers/index.php @@ -1031,8 +1031,10 @@ class Index extends CI_Controller { //添加邮件发送记录 end $this->Note_model->update_send($item->pn_txn_id, 'send', $item->pn_sn); + $this->Note_model->update_pending_send($item->pn_txn_id, 'send'); } else { $this->Note_model->update_send($item->pn_txn_id, 'send', $item->pn_sn); + $this->Note_model->update_pending_send($item->pn_txn_id, 'send'); } } //echo 'done!'; diff --git a/webht/third_party/paypal/models/note_model.php b/webht/third_party/paypal/models/note_model.php index 49d98b22..2a13a943 100644 --- a/webht/third_party/paypal/models/note_model.php +++ b/webht/third_party/paypal/models/note_model.php @@ -202,6 +202,15 @@ class Note_model extends CI_Model { return $this->HT->query($sql, array($pn_send, $pn_txn_id)); } + public function update_pending_send($pn_txn_id, $pn_send) { + $sql = " + UPDATE paypal_note + SET pn_send = ? + WHERE pn_txn_id = ? AND pn_payment_status='pending' + "; + return $this->HT->query($sql, array($pn_send, $pn_txn_id)); + } + //设置订单号 public function set_invoice($pn_txn_id, $pn_invoice) { $sql = "