From 7b6fb6b8c9cbc36f6f9976369acef1079a50426e Mon Sep 17 00:00:00 2001 From: liapples Date: Thu, 16 Sep 2021 14:58:20 +0800 Subject: [PATCH] =?UTF-8?q?body=E5=AD=97=E7=AC=A6=E4=B8=B2=E6=88=AA?= =?UTF-8?q?=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Controllers/Api/SharePayController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/Api/SharePayController.php b/app/Http/Controllers/Api/SharePayController.php index e4bfde6..b83c97f 100644 --- a/app/Http/Controllers/Api/SharePayController.php +++ b/app/Http/Controllers/Api/SharePayController.php @@ -74,7 +74,7 @@ class SharePayController extends Controller $app = Factory::payment($config); try { $result = $app->order->unify([ - 'body' => mb_substr(substr($order->title, 0, 127), 0, -1), + 'body' => mb_strcut($order->title, 0, 127), 'out_trade_no' => $order->order_no . '-' . $order->status, //后面加status,主要是为了方便微信支付回调时区分定金(首付款)和尾款支付 'total_fee' => round($price * 100), //支付金额单位为分 'notify_url' => route('wxpay_notify', ['agent_id' => $this->agent_id]), // 支付结果通知网址,如果不设置则会使用配置里的默认地址