diff --git a/webht/third_party/paypal/controllers/index.php b/webht/third_party/paypal/controllers/index.php index 04592305..0f820481 100644 --- a/webht/third_party/paypal/controllers/index.php +++ b/webht/third_party/paypal/controllers/index.php @@ -1265,7 +1265,7 @@ class Index extends CI_Controller { $opi_firstname = !empty($advisor_info->OPI_FirstName) ? $advisor_info->OPI_FirstName : !empty($advisor_info->OPI_Name) ? $advisor_info->OPI_Name : ''; //lussie //没有外联信息表示订单未分配 - if (empty($opi_email) || empty($opi_firstname)) { + if (empty($opi_email) && empty($opi_firstname)) { $this->Note_model->update_send($item->pn_txn_id, 'sendfail'); return false; } @@ -1295,7 +1295,9 @@ class Index extends CI_Controller { $M_RelatedInfo = $item->pn_sn; $M_AddTime = $item->pn_payment_date; $M_State = 0; - $this->Paypal_model->save_automail($fromName, $fromEmail, $toName, $toEmail, $subject, $body, $M_RelatedInfo, $M_State, $M_AddTime, 'paypal note'); + if (!empty($toEmail)) { + $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); $c_fromName = $advisor_detail->fullname ? $advisor_detail->fullname : $opi_firstname;