public function signature($method, $url, $options)
{
$wechatpayMiddleware = WechatPayMiddlewareS::builder()
->withMerchant($this->merchantId, $this->merchantSerialNumber, $this->merchantPrivateKey)
->withWechatPay([ $this->wechatpayCertificate ])
->build();
$stack = \GuzzleHttp\HandlerStack::create();
$stack->push($wechatpayMiddleware, 'coupon-stocks');
$client = new \GuzzleHttp\Client(['handler' => $stack]);
try {
$resp = $client->request($method, $url, [
'json' => json_decode($options, true),
'headers' => ['Accept' => '*/*', 'Content-Type' => 'application/json']
]);
echo $resp->getStatusCode() . ' ' . $resp->getReasonPhrase() . "\n";
echo $resp->getBody() . "\n";
} catch (RequestException $e) {
echo $e->getMessage()."\n";
if ($e->hasResponse()) {
echo $e->getResponse()->getStatusCode().' '.$e->getResponse()->getReasonPhrase()."\n";
echo $e->getResponse()->getBody();
}
return;
}
创建代金券批次API 报错 应答的微信支付签名验证失败,我在postman是可以调用成功的,证明参数没有问题,我用的官网提供的 wechatpay/wechatpay-guzzle-middleware
您好,您可以提供下相关信息给我们的技术支持同学查询一下:https://support.pay.weixin.qq.com/online-service?from=wechatpay