- B2b订单查询的签名算法是啥样的?没有示例,只回传错误,完全不知道什么原因导致
$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"}
09-26 - B2b申请退款有没有SDK?提示参数为空或非法 detail:[支付签名[pay_sig]校验失败
请求地址:https://api.weixin.qq.com/retail/B2b/refund?access_token=84_qGSu4zasllSKLHHITY9QHhxPJhIMj3xG3ooutS8IQ4ZSgesDP1V5nO4oxQa9hMDJfRFclzN5hBOlJc0FUFepZ7i6whawkA0kEzLeYS2DUVtZY2-BRtjyF-5TogQSMBfADALFU&pay_sig=b28d627e8464832b27f9955c76b093969e1c7a9f389d5bd97682aafe271f6ca7 请求数据:{"mchid":"1686022399","out_trade_no":"20240923142431232065","order_id":"o202409231551411832182491","out_refund_no":"r2024092611365718323558","refund_amount":100,"refund_from":1} 响应结果:{"errcode":9403200,"errmsg":"参数为空或非法 detail:[支付签名[pay_sig]校验失败] rid: 66f4d6da-72a6c1db-136fbf81"} $signData = [ "mchid" => "1686022399", "out_trade_no" => "20240923142431232065", "order_id" => "o202409231551411832182491", "out_refund_no" => "r2024092611365718323558", "refund_amount" => 100, "refund_from" => 1 ]; $signData = json_encode($signData, JSON_UNESCAPED_UNICODE); $appKey = "1OQZtyTWw94IUxhhZYPeqxcDuw8voUTN"; $pay_sig = hash_hmac('sha256', 'requestCommonPayment&' . $signData, $appKey);
09-26