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 = "