$sd = [
"mchid" => "1686022399",
"order_id" => "o202409231626334079372520",
];
$appKey = "rSYw8G8Eua4MYKMXcCgR8TTrJ8gM1wWY";
$paySig = hash_hmac('sha256', 'requestCommonPayment&' . json_encode($sd), $appKey);
$url = "https://api.weixin.qq.com/retail/B2b/getorder?access_token=$access_token&pay_sig=$paySig";
$result = curlRequest($url,$sd);
结果:{"errcode":9403200,"errmsg":"参数为空或非法 detail:[支付签名[pay_sig]校验失败] rid: 66f50fce-0ab130f3-408dcdbe"}
已解决:应该写成。打扰了
$paySig = hash_hmac('sha256', '/retail/B2b/getorder&' . json_encode($sd), $appKey);