From c25105bba8251977c3fc95d11a47863e3826f9d1 Mon Sep 17 00:00:00 2001 From: lyt Date: Fri, 19 Apr 2019 16:52:32 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=80=E6=AC=BE=E5=A4=84=E7=90=8630%?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- webht/third_party/paypal/controllers/index.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/webht/third_party/paypal/controllers/index.php b/webht/third_party/paypal/controllers/index.php index 2dacf8a9..e6ba1bd4 100644 --- a/webht/third_party/paypal/controllers/index.php +++ b/webht/third_party/paypal/controllers/index.php @@ -714,6 +714,7 @@ class Index extends CI_Controller { //找到没有发送的记录 public function send_note($pn_txn_id = false, $old_ssje=NULL) { $data = array(); + $handpick = empty($pn_txn_id) ? false : TRUE; //优先处理指定的交易号,用于修正交易号直接发送通知 if (!empty($pn_txn_id)) { @@ -880,7 +881,7 @@ class Index extends CI_Controller { //echo 'done!'; } - public function send_refund($item) + public function send_refund($item, $handpick, $old_ssje=NULL) { // 找到原始收款交易的订单 $parent_note = $this->note_modal->note($item->parent_txn_id); @@ -904,7 +905,6 @@ class Index extends CI_Controller { //根据订单号查找外联信息 $orderid_info = json_decode($orderid_info); - $handpick = empty($pn_txn_id) ? false : TRUE; $advisor_info = $this->Paypal_model->get_order($orderid_info->orderid, false, $orderid_info->ordertype, $handpick); //查不到订单信息 @@ -931,7 +931,6 @@ class Index extends CI_Controller { $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); $this->Paypal_model->insert_biz_order_log($GAI_COLI_SN, 'Refunded'); } else { - // 把订单状态设置为13-新订单已支付 if (false == $this->Paypal_model->if_biz_gai_exists($item->pn_txn_id) ) { $this->Paypal_model->insert_biz_order_log($GAI_COLI_SN, 'Refunded'); } @@ -946,8 +945,6 @@ class Index extends CI_Controller { $gai_sn = $this->Paypal_model->add_tour_account_info($GAI_COLI_SN, $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, $item->pn_payer_email, $item->pn_txn_id, $ht_memo); //添加汉特的订单提醒 $this->Paypal_model->update_coli_introduction($GAI_COLI_SN, '已退款 ' . mb_strtoupper($item->pn_mc_currency) . $item->pn_mc_gross); - // 添加HT任务 // todo 是否还需要 - $this->Paypal_model->exec_addToTask($gai_sn); } } @@ -973,8 +970,10 @@ class Index extends CI_Controller { $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'); + // TODO 通知财务, 如果已做账 //添加邮件发送记录 end + return $this->Note_model->update_send($item->pn_txn_id, 'send'); }