Closed MikeMaldini closed 1 year ago
你并不需要传递$.headers.Authorization
请求头,SDK已经内置自动签名了,你的代码修型如下:
$Params = [
"amount" => [ "total" => $Price, "currency" => $Currency ],
"mchid" => $this -> MerchantId,
"description" => $Description,
"notify_url" => "https://www.weixin.qq.com/wxpay/pay.php",
"out_trade_no" => $Order,
"appid" => $this -> AppId,
"attach" => "自定义数据说明",
"scene_info" => [ "payer_client_ip" => "14.23.150.211", "h5_info" => [ "type" => "Wap" ] ]
];
$Resp = $Pay_Instance -> chain( 'v3/pay/transactions/h5' ) -> post([
'json' => $Params,
]);
$RealData = json_decode((string) $Resp->getBody());
//print_r($RealData);
运行环境
描述你的问题现象
二位数组会挂的 有更多的列子么 还有报错说签名不对 但你们的例子里又没签名步骤 不懂了