设置已发送的指定sn

feature/pay
lyt 6 years ago
parent 959c3bf25f
commit 176d1313fd

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

Loading…
Cancel
Save