还是不行,直接上函数: //添加分账 $client = \logic\Realname::wxpayClient(); $url = 'https://api.mch.weixin.qq.com/v3/ecommerce/profitsharing/receivers/add'; $args= [ 'appid' => \logic\Realname::$APP_ID, //公众号 'type' => 'PERSONAL_OPENID', 'account' => $account, 'relation_type' => 'OTHERS', // 'name' => $uname, 'encrypted_name' => \logic\Realname::encrypt($uname), //直接调用微信提供的加密函数 ]; $resp = $client->request('POST',$url,[ 'json' => $args, 'headers' => [ 'Accept' => 'application/json','Wechatpay-Serial'=>\logic\Realname::$WECHATPAY_SERIAL]] ); $body = $resp->getBody(); $body = json_decode($body,true); print_r($body); 分账: $args = [ 'appid' =>\logic\Realname::$APP_ID, //公众号 'sub_mchid' =>$sub_mchid, 'transaction_id'=>$transaction_id, 'out_order_no' =>$transaction_id, 'finish' => false, 'receivers' => [ [ 'type' => 'PERSONAL_OPENID', 'receiver_account'=> $account, 'amount' => 1, 'description' => '1分钱', 'receiver_name' => \logic\Realname::encrypt("{$uname}"), ] ] ]; $resp = $client->request('POST',$url,[ 'json' => $args, 'headers' => [ 'Accept' => 'application/json','Wechatpay-Serial'=>'6BE471E533C9C1B15BAB71AA68C2B029370D7B0F']] ); $body = $resp->getBody(); $body = json_decode($body,true); print_r($body); 实在看不出哪里有问题。
收付通分账接口报错:与添加接收方时的姓名不符,请先更新接收方实名信息如何排查?添加分账接口: https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter7_4_7.shtml 分账接口: https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter7_4_1.shtml 问题 1.添加分账接口和请求分账接口中 接收方名称的密文 使用的加密函数是统一的吗(添加分账接口中多了一句话:字段加密: 使用APIv3定义的方式加密) 2.请求分账接口中如果屏蔽掉 receiver_name 就能分账成功,有该字段就提示:与添加接收方时的姓名不符,请先更新接收方实名信息 3.确定分账接收人已经实名 4.确定统一的敏感信息加密函数正常(二级商户进件时候就能正常使用), 一头雾水 如何排查啊,分账时候 receiver_name 肯定是不能去掉的。 5.商户的id 1605676442 跪求各位大拿帮看下。
2021-03-11