"sub_mchid"=>"1601114161",
"appid"=>"wx117a0234324f60c",
"transaction_id"=>"4200002xxxxxx690299587", //微信订单号
"out_order_no"=>"104", //商户分账单号
"receivers"=>[
[
"type"=>"PERSONAL_OPENID", //MERCHANT_ID:商户号 2、PERSONAL_OPENID:个人openid(由父商户APPID转换得到) 3、PERSONAL_SUB_OPENID: 个人sub_openid(由子商户APPID转换得到)
"account"=>"oGUbk5Xkm91XL_gb-urq8JPrjdr8",
"amount"=>'1',
"description"=>"分给oGUbk5Xkm91XL_gb-urq8JPrjdr8"
]
],
"unfreeze_unsplit"=>true,
see https://wechatpay.im/openapi/v3/profitsharing/orders
$response = $instance->chain('v3/profitsharing/orders')->post([ 'json' => [ 'sub_mchid' => '1900000109', 'appid' => 'wx8888888888888888', 'sub_appid' => 'wx8888888888888889', 'transaction_id' => '4208450740201411110007820472', 'out_order_no' => 'P20150806125346', 'receivers' => [[ 'type' => 'MERCHANT_ID', 'account' => '86693852', 'name' => 'hu89ohu89ohu89o', 'amount' => 888, 'description' => '分给商户A', ],], 'unfreeze_unsplit' => true, ], 'headers' => [ 'Wechatpay-Serial' => 'PUB_KEY_ID_0114232134912410000000000000', ], ]); print_r(json_decode((string) $response->getBody(), true));
Client error: `POST
https://api.mch.weixin.qq.com/v3/profitsharing/orders` resulted in a
`400 Bad Request` response:
{"code":"PARAM_ERROR","detail":{"location":null,"value":"sub_mchid=1601114161&appid=wx117xxxxxe23f60c&transaction_id=42
(truncated...)
"detail":{"location":null,
"value":"sub_mchid=1601114161&appid=wx117a22342323f60c&transaction_id=4200002670202506196690299587&out_order_no=104&receivers%5B0%5D%5Btype%5D=PERSONAL_OPENID&receivers%5B0%5D%5Baccount%5D=oGUbk5Xkm91XL_gb-urq8JPrjdr8&receivers%5B0%5D%5Bamount%5D=1&receivers%5B0%5D%5Bdescription%5D=%E5%88%86%E7%BB%99oGUbk5Xkm91XL_gb-urq8JPrjdr8&unfreeze_unsplit=0"},
"message":"解析 Json 出错 (位置: /body): * Line 1, Column 1\n Syntax error: value, object or array expected.\n"}
{"code":"PARAM_ERROR",
"detail":{"location":null,
"value":"sub_mchid=1601114161&appid=wx117a22342323f60c&transaction_id=4200002670202506196690299587&out_order_no=104&receivers%5B0%5D%5Btype%5D=PERSONAL_OPENID&receivers%5B0%5D%5Baccount%5D=oGUbk5Xkm91XL_gb-urq8JPrjdr8&receivers%5B0%5D%5Bamount%5D=1&receivers%5B0%5D%5Bdescription%5D=%E5%88%86%E7%BB%99oGUbk5Xkm91XL_gb-urq8JPrjdr8&unfreeze_unsplit=0"},
"message":"解析 Json 出错 (位置: /body): * Line 1, Column 1\n Syntax error: value, object or array expected.\n"}
报错什么?话说一半让人猜谜语么