overtrue / laravel-wechat

微信 SDK for Laravel, 基于 overtrue/wechat
MIT License
2.88k stars 502 forks source link

openssl_sign() #463

Closed lamhingfai closed 1 year ago

lamhingfai commented 2 years ago

"overtrue/laravel-wechat": "^7.1",

$res = $app->getClient()->postJson("v3/pay/transactions/jsapi", [ 'appid'=> $app->getConfig()['wx_app_id'], "mchid" => $app->getConfig()['mch_id'], "description" => "Image形象店-深圳腾大-QQ公仔", "out_trade_no" => $order_num, "notify_url" => $app->getConfig()['notify_url'], "amount" => [ "total" => $money, "currency" => "CNY" ], "payer" => [ "openid" => $openid // <---- 请修改为服务号下单用户的 openid ] ]); 统一下单报错 ErrorException: openssl_sign(): Supplied key param cannot be coerced into a private key in file