$params = [
'mchid' => $wechat_config['mchid'],
"out_trade_no" => $order['order_sn'],
'appid' => $wechat_config['appid'],
"description" => $order['desc'],
"notify_url" => Env::get("notify.wechat"),
'amount' => [
'total' => intval(bcmul($order['amount'], 100)),
'currency' => 'CNY',
],
];
$res = $wechat_client->v3->pay->transactions->app->post([
'json' => $params,
]);
return [$res->getStatusCode(), $res->getBody(), $params];
这样结构应该是没有问题才对,但是没有prepay_id返回,是为什么?
状态码200,理论上是不会出现没有任何信息返回的,打印日志看看