diff --git a/admin/controllers/app/Profinish.php b/admin/controllers/app/Profinish.php index ab379ac7..8dbe5f9b 100644 --- a/admin/controllers/app/Profinish.php +++ b/admin/controllers/app/Profinish.php @@ -6,6 +6,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * Date: 2021/09/02 * Time: 17:45 */ +require_once COMMPATH.'libraries/WechatPayV3.php'; class Profinish extends HD_Controller { private $log_file = 'profinish.log'; @@ -37,7 +38,6 @@ class Profinish extends HD_Controller public function edit() { - $sub_mchid = $this->input->post('sub_mchid'); $transaction_id = $this->input->post('transaction_id'); $description = $this->input->post('description'); @@ -48,7 +48,6 @@ class Profinish extends HD_Controller $out_order_no = create_order_no(); $this->config->load('wxpay'); $wx_config = $this->config->item('default'); - $this->load->library('WechatPayV3'); $params = [ 'merchantId' => $wx_config['mchid'], 'merchantSerialNumber' => $wx_config['merchantSerialNumber'], diff --git a/api/controllers/wxapp/app/Payment.php b/api/controllers/wxapp/app/Payment.php index 7274445e..30ed99ba 100644 --- a/api/controllers/wxapp/app/Payment.php +++ b/api/controllers/wxapp/app/Payment.php @@ -8,6 +8,7 @@ defined('WXAPP_APP') OR exit('No direct script access allowed'); * Time: 19:47 */ require_once APPPATH . 'controllers/wxapp/Wxapp.php'; +require_once COMMPATH.'libraries/WechatPayV3.php'; class Payment extends Wxapp{ public function __construct($inputs, $app_key){ @@ -40,7 +41,6 @@ class Payment extends Wxapp{ $this->config->load('wxpay'); $wx_config = $this->config->item('default'); - $this->load->library('WechatPayV3'); $params = [ 'merchantId' => $wx_config['mchid'], 'merchantSerialNumber' => $wx_config['merchantSerialNumber'],