|
|
|
@ -1309,6 +1309,7 @@ class Index extends CI_Controller {
|
|
|
|
|
//更新正确的订单信息到记录中,以这个为主
|
|
|
|
|
$this->Note_model->set_invoice($item->pn_txn_id, $orderid_info->orderid . '_' . $orderid_info->ordertype);
|
|
|
|
|
}
|
|
|
|
|
$is_webhook = false;
|
|
|
|
|
$payment_fee = 0;
|
|
|
|
|
$refund_amount = 0;
|
|
|
|
|
if (isset($payment_memo->id) && substr($payment_memo->id, 0, 2)==="WH") {
|
|
|
|
@ -1367,8 +1368,11 @@ class Index extends CI_Controller {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//添加邮件发送记录
|
|
|
|
|
if ($item->pn_send !== 'send' && substr($item->pn_send, 0, 5) !== 'send-') {
|
|
|
|
|
$this->Note_model->update_send($item->pn_txn_id, 'send-', $item->pn_sn);
|
|
|
|
|
//添加邮件发送记录; webhook不发送邮件, 避免重复
|
|
|
|
|
if ($is_webhook === false) {
|
|
|
|
|
if ($item->pn_send !== 'send' && substr($item->pn_send, 0, 5) !== 'send-'
|
|
|
|
|
) {
|
|
|
|
|
// 客人邮件中的外联落款
|
|
|
|
|
// $web_code = 'cht'; // 默认cht
|
|
|
|
|
$web_lgc = 1;
|
|
|
|
@ -1395,7 +1399,18 @@ class Index extends CI_Controller {
|
|
|
|
|
$M_AddTime = $item->pn_payment_date;
|
|
|
|
|
$M_State = 0;
|
|
|
|
|
if (!empty($toEmail)) {
|
|
|
|
|
$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'
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
// 通知客人, 客人邮箱
|
|
|
|
|
// $customer_detail = $this->Paypal_model->get_customer_detail($advisor_info->COLI_SN, $orderid_info->ordertype);
|
|
|
|
@ -1431,6 +1446,7 @@ class Index extends CI_Controller {
|
|
|
|
|
if ($this->Paypal_model->if_finance_done($advisor_info->COLI_GRI_SN, $late_entry_date_set) === true) {
|
|
|
|
|
$this->Note_model->update_send($item->pn_txn_id, 'send-to-finance', $item->pn_sn);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
$this->Note_model->update_send_case($parent_txn_id, 'send');
|
|
|
|
|
return ;
|
|
|
|
|
}
|
|
|
|
|