From 11f9e9967f1892c4af69bd37c0f2836abd460565 Mon Sep 17 00:00:00 2001 From: lyt Date: Wed, 8 May 2019 10:02:17 +0800 Subject: [PATCH] =?UTF-8?q?paypal=20=E6=94=B6=E6=AC=BE=E9=80=9A=E7=9F=A5:?= =?UTF-8?q?=E9=82=AE=E4=BB=B6=E4=B8=8D=E9=87=8D=E5=A4=8D=E5=8F=91;=20?= =?UTF-8?q?=E5=95=86=E6=97=85=E6=96=B0=E5=A2=9E=E7=9A=84CHTAPP-biz?= =?UTF-8?q?=E9=9C=80=E4=B8=8EAPP=E7=BB=84=E7=9A=84=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E5=8C=BA=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../third_party/paypal/controllers/index.php | 31 ++++++++++--------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/webht/third_party/paypal/controllers/index.php b/webht/third_party/paypal/controllers/index.php index 9569c86f..08bd185b 100644 --- a/webht/third_party/paypal/controllers/index.php +++ b/webht/third_party/paypal/controllers/index.php @@ -828,7 +828,7 @@ class Index extends CI_Controller { $ht_memo = '交易号(自动录入):' . $item->pn_txn_id; $GAI_COLI_SN = isset($advisor_info->COLI_SN) ? $advisor_info->COLI_SN : 0; //CHTAPP订单添加记录前判断是否有记录,以前的APP版本没有交易号,只能拿金额来判断 - if (substr($advisor_info->COLI_WebCode, 0, 6) == 'CHTAPP') {//只判断前6位字符,CHTAPP-fr CHTAPP-jp等各语种都属于APP订单 + if (substr($advisor_info->COLI_WebCode, 0, 6) == 'CHTAPP' && strstr($advisor_info->COLI_WebCode, "-") !== '-biz') {//只判断前6位字符,CHTAPP-fr CHTAPP-jp等各语种都属于APP订单 $this->Paypal_model->add_account_info_forAPP($GAI_COLI_SN, $advisor_info->COLI_ID, $item->pn_mc_gross, $item->pn_payment_date, mb_strtoupper($item->pn_mc_currency), $ssje, $item->pn_payment_date, $item->pn_payment_date, $item->pn_payment_date, '', $item->pn_payer_email, $item->pn_txn_id, $ht_memo); if ($advisor_info->COLI_WebCode == 'CHTAPP' && $advisor_info->COLI_State == 11) { //只修改APP组的订单状态,并且订单进度是我的订单 $this->Paypal_model->update_biz_coli_state($GAI_COLI_SN, 8); //把订单状态改为已付款 @@ -869,20 +869,21 @@ class Index extends CI_Controller { //添加邮件发送记录 - //给外联发送通知邮件 - $fromName = !empty($item->pn_payer) ? $item->pn_payer : ''; - $fromEmail = !empty($item->pn_payer_email) ? $item->pn_payer_email : ''; - $toName = !empty($opi_firstname) ? $opi_firstname : ''; - $toEmail = !empty($opi_email) ? $opi_email : ''; - $subject = $orderid_info->orderid . '_' . $orderid_info->ordertype . ' / ' . $item->pn_mc_gross . $item->pn_mc_currency . ' / ' . $fromName; - $body = $this->load->view('mail_templete', $item, true); //$item->pn_memo; - $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'); - //添加邮件发送记录 end - - $this->Note_model->update_send($item->pn_txn_id, 'send'); + if ($item->pn_send !== 'send') { + //给外联发送通知邮件 + $fromName = !empty($item->pn_payer) ? $item->pn_payer : ''; + $fromEmail = !empty($item->pn_payer_email) ? $item->pn_payer_email : ''; + $toName = !empty($opi_firstname) ? $opi_firstname : ''; + $toEmail = !empty($opi_email) ? $opi_email : ''; + $subject = $orderid_info->orderid . '_' . $orderid_info->ordertype . ' / ' . $item->pn_mc_gross . $item->pn_mc_currency . ' / ' . $fromName; + $body = $this->load->view('mail_templete', $item, true); //$item->pn_memo; + $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'); + //添加邮件发送记录 end + $this->Note_model->update_send($item->pn_txn_id, 'send'); + } } //echo 'done!'; }