diff --git a/webht/third_party/pay/controllers/AlipayTradeService.php b/webht/third_party/pay/controllers/AlipayTradeService.php index eeab05f0..fe8190b5 100644 --- a/webht/third_party/pay/controllers/AlipayTradeService.php +++ b/webht/third_party/pay/controllers/AlipayTradeService.php @@ -384,11 +384,13 @@ class AlipayTradeService extends CI_Controller // $this->Alipay_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), $item->pn_payment_date, $item->pn_payment_date, $item->pn_payment_date, '', $item->pn_payer_email, $item->ALI_dealId, $ht_memo); // if ($advisor_info->COLI_WebCode == 'CHTAPP' && $advisor_info->COLI_State == 11) { //只修改APP组的订单状态,并且订单进度是我的订单 // $this->Alipay_model->update_biz_coli_state($GAI_COLI_SN, 8); //把订单状态改为已付款 + // $this->Alipay_model->insert_biz_order_log($GAI_COLI_SN, 'BS8'); // } } else { // 把订单状态设置为13-新订单已支付 if (false == $this->Alipay_model->if_biz_gai_exists($item->ALI_dealId) ) { $this->Alipay_model->update_biz_coli_state($GAI_COLI_SN, 13); + $this->Alipay_model->insert_biz_order_log($GAI_COLI_SN, 'BS13'); } $this->Alipay_model->add_account_info( $GAI_COLI_SN, diff --git a/webht/third_party/pay/controllers/iPayLinksService.php b/webht/third_party/pay/controllers/iPayLinksService.php index a939b143..e3e7ebeb 100644 --- a/webht/third_party/pay/controllers/iPayLinksService.php +++ b/webht/third_party/pay/controllers/iPayLinksService.php @@ -462,11 +462,13 @@ class IPayLinksService extends CI_Controller // if ($advisor_info->COLI_WebCode == 'CHTAPP' && $advisor_info->COLI_State == 11) { // //只修改APP组的订单状态,并且订单进度是我的订单 // $this->IPayLinks_model->update_biz_coli_state($GAI_COLI_SN, 8); //把订单状态改为已付款 + // $this->IPayLinks_model->insert_biz_order_log($GAI_COLI_SN, 'BS8'); // } } else { // 把订单状态设置为13-新订单已支付 if (false == $this->IPayLinks_model->if_biz_gai_exists($item->IPL_dealId) ) { $this->IPayLinks_model->update_biz_coli_state($GAI_COLI_SN, 13); + $this->IPayLinks_model->insert_biz_order_log($GAI_COLI_SN, 'BS13'); } $this->IPayLinks_model->add_account_info( $GAI_COLI_SN, diff --git a/webht/third_party/pay/models/Alipay_model.php b/webht/third_party/pay/models/Alipay_model.php index 4e7644bb..1d17f7c0 100644 --- a/webht/third_party/pay/models/Alipay_model.php +++ b/webht/third_party/pay/models/Alipay_model.php @@ -333,4 +333,18 @@ class Alipay_model extends CI_Model { $query = $this->HT->query($sql); return $query; } + + /** 写入商务订单操作记录 */ + public function insert_biz_order_log($coli_sn, $log_info) + { + $db_column = array( + "BOL_COLI_SN" => $coli_sn + ,"BOL_OPI_SN" => 0 + ,"BOL_OPType" => $log_info + ,"BOL_OPTime" => date('Y-m-d H:i:s') + ,"BOL_Creator" => 0 + ,"BOL_CreateTime" => date('Y-m-d H:i:s') + ); + return $this->HT->insert("BIZ_OrderOperationLog", $db_column); + } } diff --git a/webht/third_party/pay/models/IPayLinks_model.php b/webht/third_party/pay/models/IPayLinks_model.php index ba7a4687..de3fb567 100644 --- a/webht/third_party/pay/models/IPayLinks_model.php +++ b/webht/third_party/pay/models/IPayLinks_model.php @@ -391,4 +391,18 @@ class IPayLinks_model extends CI_Model { $query = $this->HT->query($sql); return $query; } + + /** 写入商务订单操作记录 */ + public function insert_biz_order_log($coli_sn, $log_info) + { + $db_column = array( + "BOL_COLI_SN" => $coli_sn + ,"BOL_OPI_SN" => 0 + ,"BOL_OPType" => $log_info + ,"BOL_OPTime" => date('Y-m-d H:i:s') + ,"BOL_Creator" => 0 + ,"BOL_CreateTime" => date('Y-m-d H:i:s') + ); + return $this->HT->insert("BIZ_OrderOperationLog", $db_column); + } } diff --git a/webht/third_party/paypal/controllers/index.php b/webht/third_party/paypal/controllers/index.php index 87c17ead..adf0ac0b 100644 --- a/webht/third_party/paypal/controllers/index.php +++ b/webht/third_party/paypal/controllers/index.php @@ -814,11 +814,13 @@ 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); if ($advisor_info->COLI_WebCode == 'CHTAPP' && $advisor_info->COLI_State == 11) { //只修改APP组的订单状态,并且订单进度是我的订单 $this->Paypal_model->update_biz_coli_state($GAI_COLI_SN, 8); //把订单状态改为已付款 + $this->Paypal_model->insert_biz_order_log($GAI_COLI_SN, 'BS8'); } } else { // 把订单状态设置为13-新订单已支付 if (false == $this->Paypal_model->if_biz_gai_exists($item->pn_txn_id) ) { $this->Paypal_model->update_biz_coli_state($GAI_COLI_SN, 13); + $this->Paypal_model->insert_biz_order_log($GAI_COLI_SN, 'BS13'); } $this->Paypal_model->add_account_info($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); // 更新订单主表付款方式,防止没访问thankyou-train.asp diff --git a/webht/third_party/paypal/models/paypal_model.php b/webht/third_party/paypal/models/paypal_model.php index 110d2e70..781db229 100644 --- a/webht/third_party/paypal/models/paypal_model.php +++ b/webht/third_party/paypal/models/paypal_model.php @@ -584,4 +584,18 @@ class Paypal_model extends CI_Model { $query = $this->HT->query($sql); return $query; } + + /** 写入商务订单操作记录 */ + public function insert_biz_order_log($coli_sn, $log_info) + { + $db_column = array( + "BOL_COLI_SN" => $coli_sn + ,"BOL_OPI_SN" => 0 + ,"BOL_OPType" => $log_info + ,"BOL_OPTime" => date('Y-m-d H:i:s') + ,"BOL_Creator" => 0 + ,"BOL_CreateTime" => date('Y-m-d H:i:s') + ); + return $this->HT->insert("BIZ_OrderOperationLog", $db_column); + } }