diff --git a/webht/third_party/paypal/controllers/index.php b/webht/third_party/paypal/controllers/index.php index 56824536..191be529 100644 --- a/webht/third_party/paypal/controllers/index.php +++ b/webht/third_party/paypal/controllers/index.php @@ -842,7 +842,7 @@ class Index extends CI_Controller { //只处理完成状态,其他状态由陆燕处理 if (strtolower($item->pn_payment_status) !== 'completed') { - $this->Note_model->update_send($item->pn_txn_id, 'sendfail'); + $this->Note_model->update_send($item->pn_txn_id, 'sendfail', $item->pn_sn); continue; } @@ -864,7 +864,7 @@ class Index extends CI_Controller { //找不到订单号,设置为发送失败标示 if (empty($orderid_info)) { - $this->Note_model->update_send($item->pn_txn_id, 'sendfail'); + $this->Note_model->update_send($item->pn_txn_id, 'sendfail', $item->pn_sn); continue; } $orderid_info = json_decode($orderid_info); @@ -900,7 +900,7 @@ class Index extends CI_Controller { //查不到订单信息 if (empty($advisor_info)) { - $this->Note_model->update_send($item->pn_txn_id, 'sendfail'); + $this->Note_model->update_send($item->pn_txn_id, 'sendfail', $item->pn_sn); continue; } @@ -973,12 +973,12 @@ class Index extends CI_Controller { //没有外联信息表示订单未分配 if (empty($opi_email) || empty($opi_firstname)) { - $this->Note_model->update_send($item->pn_txn_id, 'sendfail'); + $this->Note_model->update_send($item->pn_txn_id, 'sendfail', $item->pn_sn); continue; } //添加邮件发送记录 - if ($item->pn_send !== 'send' && false===$is_webhook) { + if ( ($item->pn_send !== 'send' && false===$is_webhook ) || true===$handpick) { //给外联发送通知邮件 $fromName = !empty($item->pn_payer) ? $item->pn_payer : ''; $fromEmail = !empty($item->pn_payer_email) ? $item->pn_payer_email : ''; @@ -992,9 +992,9 @@ class Index extends CI_Controller { $this->Paypal_model->save_automail($fromName, $fromEmail, $toName, $toEmail, $subject, $body, $M_RelatedInfo, $M_State, $M_AddTime, 'paypal note'); //添加邮件发送记录 end - $this->Note_model->update_send($item->pn_txn_id, 'send'); + $this->Note_model->update_send($item->pn_txn_id, 'send', $item->pn_sn); } else { - $this->Note_model->update_send($item->pn_txn_id, 'send'); + $this->Note_model->update_send($item->pn_txn_id, 'send', $item->pn_sn); } } //echo 'done!'; @@ -1132,12 +1132,12 @@ class Index extends CI_Controller { $c_M_State, $c_M_AddTime, 'ChinaHighlights refund receipt'); - $this->Note_model->update_send($item->pn_txn_id, 'send-customer'); + $this->Note_model->update_send($item->pn_txn_id, 'send-customer', $item->pn_sn); } //添加邮件发送记录 end // 如果已做账, 标记需要通知财务send-to-finance, 通知时间用订单日志记录 if ($this->Paypal_model->if_finance_exists($advisor_info->COLI_GRI_SN)===true) { - $this->Note_model->update_send($item->pn_txn_id, 'send-to-finance'); + $this->Note_model->update_send($item->pn_txn_id, 'send-to-finance', $item->pn_sn); } return ; } @@ -1211,7 +1211,7 @@ class Index extends CI_Controller { $send_type = "send"; } - $this->Note_model->update_send($paypal_msg->pn_txn_id, $send_type); + $this->Note_model->update_send($paypal_msg->pn_txn_id, $send_type, $item->pn_sn); } //所有记录列表 @@ -1306,7 +1306,7 @@ class Index extends CI_Controller { $data = array(); $data['note'] = $this->Note_model->note($pn_txn_id); if (!empty($data['note'])) { - $this->Note_model->update_send($pn_txn_id, 'send'); + $this->Note_model->update_send($pn_txn_id, 'send', $item->pn_sn); echo json_encode('通知已经关闭!'); return true; } @@ -1568,7 +1568,7 @@ class Index extends CI_Controller { $data = array(); $data['note'] = $this->Note_model->note($pn_txn_id); if (!empty($data['note'])) { - $this->Note_model->update_send($pn_txn_id, 'closeRecord'); + $this->Note_model->update_send($pn_txn_id, 'closeRecord', $item->pn_sn); echo json_encode('该收款记录已经忽略!'); return true; } @@ -1607,7 +1607,7 @@ class Index extends CI_Controller { $M_State = 0; $this->Paypal_model->save_automail($fromName, $fromEmail, $toName, $toEmail, $subject, $body, $M_RelatedInfo, $M_State, $M_AddTime, 'paypal note'); //添加邮件发送记录 end - $this->Note_model->update_send($item->pn_txn_id, 'send'); + $this->Note_model->update_send($item->pn_txn_id, 'send', $item->pn_sn); } $order_gai = $this->Paypal_model->get_money_list($orderid_info->orderid); return empty($order_gai);