yansongda/pay

微信公众号支付,支付成功1分钟后,执行分账,添加分账接收方出错

andy236726493 opened this issue · 0 comments

包版本号

v3.5.0

问题描述

微信公众号支付,支付成功1分钟后,执行分账,添加分账接收方出错

你的代码

    //初始化pay
    $config                     = $this->getPayConfig( $merchant );  //根据商户获取支付配置config
    $wechatpaySerial            = $this->getCertificate($config['wechat']['default']['mch_public_cert_path']);
    $config['http']['headers']  = [
                    'Wechatpay-Serial' => $wechatpaySerial['serialNumber']
    ];
    $pay            = $this->pay->wechat( $config );
    /*********添加分账接收方插件    *********/
    $adParams       = [
                        'type'          => 'MERCHANT_ID',    //分账接收方类型
                        'account'       => (string) $mch_id, //分账接收方账号
                        'name'          => $mch_name,
                        'relation_type' => 'SERVICE_PROVIDER',
                    ];

    //引入添加分账接收方插件
    $AddReceiverPlugin = $pay->mergeCommonPlugins([AddReceiverPlugin::class]);
    //发起请求
    $adResp             = $pay->pay($AddReceiverPlugin, $adParams);

报错详情

$pay->pay($AddReceiverPlugin, $adParams); 出错
[ERROR] Wechat serial no not found: [56] in /www/wwwroot/cs.web.com/vendor/yansongda/pay/src/Traits/HasWechatEncryption.php
[ERROR] #0 /www/wwwroot/cs.xftedu.com/vendor/yansongda/pay/src/Plugin/Wechat/Fund/Profitsharing/AddReceiverPlugin.php(79): Yansongda\Pay\Plugin\Wechat\Fund\Profitsharing\AddReceiverPlugin->getPublicKey()

sdk 日志

"monolog/monolog": "^2.9", 已安装

'logger' => [
'enable' => true,
'file' => '/www/wwwroot/cs.web.com/public/uploadfile/log/pay.log',
'level' => 'debug', // 建议生产环境等级调整为 info,开发环境为 debug
'type' => 'single', // optional, 可选 daily.
'max_file' => 30, // optional, 当 type 为 daily 时有效,默认 30 天
],

但pay.log 没生成

nginx/apache 日志

涉及到 异步通知、同步通知 的问题,请贴出来