From 9f9fbcdcdcf0cc916a482bb389031c251e02a9f5 Mon Sep 17 00:00:00 2001 From: weizong song Date: Thu, 2 Jan 2025 00:09:32 +0800 Subject: [PATCH] up --- app/Models/Refund.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/Models/Refund.php b/app/Models/Refund.php index 7291c6e..97c1bbf 100755 --- a/app/Models/Refund.php +++ b/app/Models/Refund.php @@ -95,17 +95,18 @@ class Refund extends SoftDeletesModel */ public function weixinRefund() { + $order = $this->order; $url = "https://api.mch.weixin.qq.com/secapi/pay/refund"; - $CommonUtilPub = new \CommonUtilPub(); - $WxPayConfPub = new \WxPayConfPub(); + $CommonUtilPub = new \CommonUtilPub($order->project_id); + $WxPayConfPub = new \WxPayConfPub($order->project_id); $inputObj = []; $inputObj["transaction_id"] = $this->relatedRecharge->payment_serial; $inputObj["out_refund_no"] = $this->serial; $inputObj["total_fee"] = $this->relatedRecharge->money * 100; $inputObj["refund_fee"] = $this->money * 100; $inputObj["nonce_str"] = $CommonUtilPub->createNoncestr(); - $inputObj["appid"] = $WxPayConfPub::APPID; - $inputObj["mch_id"] = $WxPayConfPub::MCHID; + $inputObj["appid"] = $WxPayConfPub::$APPID; + $inputObj["mch_id"] = $WxPayConfPub::$MCHID; $inputObj["sign"] = $CommonUtilPub->getSign($inputObj); $xml = $CommonUtilPub->arrayToXml($inputObj);