From 13983fbc67e354e222b398290f1c6a561cd24a64 Mon Sep 17 00:00:00 2001 From: Lei OT Date: Tue, 12 Dec 2023 10:56:31 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E7=BD=91=E7=AB=99=E6=94=AF=E4=BB=98?= =?UTF-8?q?=E9=A2=9D=E9=80=80=E6=AC=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- webht/third_party/paypal/controllers/index.php | 16 ++++++++++++++-- webht/third_party/paypal/models/note_model.php | 2 +- webht/third_party/paypal/views/note_list.php | 2 +- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/webht/third_party/paypal/controllers/index.php b/webht/third_party/paypal/controllers/index.php index a163bd08..2f640a6a 100644 --- a/webht/third_party/paypal/controllers/index.php +++ b/webht/third_party/paypal/controllers/index.php @@ -916,11 +916,10 @@ class Index extends CI_Controller { $advisor_info_from_tmp = $this->Paypal_model->get_order($orderid_info->orderid, false, 'M', $handpick); /** * 传统订单, 网站支付 - * 已经录入, 后来重新生成订单号, 不再邮件通知了 * @author LYT */ if (empty($advisor_info) && ! empty($advisor_info_from_tmp) && $orderid_info->ordertype == 'T') { - $this->Note_model->update_send($item->pn_txn_id, 'closeRecord', $item->pn_sn); + // $this->Note_model->update_send($item->pn_txn_id, 'closeRecord', $item->pn_sn); $this->Note_model->set_invoice($item->pn_txn_id, $advisor_info_from_tmp->COLI_ID . '_' . $orderid_info->ordertype); continue; } @@ -1068,6 +1067,19 @@ class Index extends CI_Controller { //根据订单号查找外联信息 $advisor_info = $this->Paypal_model->get_order($orderid_info->orderid, false, $orderid_info->ordertype, $handpick); + + //根据订单号查找外联信息, 从临时表 + $advisor_info_from_tmp = $this->Paypal_model->get_order($orderid_info->orderid, false, 'M', $handpick); + /** + * 传统订单, 网站支付 + * @author LYT + */ + if (empty($advisor_info) && ! empty($advisor_info_from_tmp) && $orderid_info->ordertype == 'T') { + // $this->Note_model->update_send($item->pn_txn_id, 'closeRecord', $item->pn_sn); + $this->Note_model->set_invoice($item->pn_txn_id, $advisor_info_from_tmp->COLI_ID . '_' . $orderid_info->ordertype); + continue; + } + //查不到订单信息 if (empty($advisor_info)) { $this->Note_model->update_send($item->pn_txn_id, 'sendfail'); diff --git a/webht/third_party/paypal/models/note_model.php b/webht/third_party/paypal/models/note_model.php index 48f057e2..db756a63 100644 --- a/webht/third_party/paypal/models/note_model.php +++ b/webht/third_party/paypal/models/note_model.php @@ -182,7 +182,7 @@ class Note_model extends CI_Model { { $ele->fundsource = ""; $raw = json_decode($ele->pn_memo); - $business = isset($raw->business) ? $raw->business : '0'; + $business = isset($raw->business) ? $raw->business : (isset($raw->receiver_email) ? $raw->receiver_email : '0'); if ($this->code_fundsource[$business]) { $ele->fundsource = $this->code_fundsource[$business]; } diff --git a/webht/third_party/paypal/views/note_list.php b/webht/third_party/paypal/views/note_list.php index 9fe2d495..75bfd9c6 100644 --- a/webht/third_party/paypal/views/note_list.php +++ b/webht/third_party/paypal/views/note_list.php @@ -236,7 +236,7 @@ echo "