v3/pay/partner/transactions/jsapi
$resp = $instance
->chain($this->api['transactions'])
->post([
'json' => [
'sp_appid'=>$this->config['sp_appid'],
'sp_mchid'=>$this->config['sp_mchid'],
'sub_mchid'=>$param['sub_mchid'],
'description'=>$param['description'],
'out_trade_no'=>$param['out_trade_no'],
'notify_url'=>$this->notify,
'settle_info'=>[
'profit_sharing'=>true,
],
'amount'=>[
'total'=>$param['total']*100,
'currency'=>'CNY',
],
'payer'=>[
'sp_openid'=>$param['sp_openid'],
],
],
]);
Client error: `POST https:
response: {"code":"SIGN_ERROR","message":"签名错误"} 401 Unauthorized {"code":"SIGN_ERROR","message":"签名错误"}
/www/wwwroot/laiketui/vendor/guzzlehttp/guzzle/src/Middleware.php(69):
GuzzleHttp\Exception\RequestException::create()
GuzzleHttp\Middleware::GuzzleHttp\{closure}()
官方sdk,例子 ,有啥缺失的吗,需要传 Authorization??sdk里生成 Authorization 的方法是哪个?
初始化参数都是黑的,猜不到问题