添加分账接收方的时候如果传递name参数失败?
接口v3/profitsharing/receivers/add 我使用的是平台证书还没有改用微信支付公钥 name参数我使用的平台证书进行了加密,也传递了Wechatpay-Serial平台证书的序列号,但服务端返回 array:2 [ "code" => "PARAM_ERROR" "message" => "平台私钥解密失败" ], 其问下有人知道是怎么回事么? 如果不传name参数是没问题的,但添加商户的时候name是必须的 加密方式用的官方的wechatpay/wechatpay 包,加密代码如下 public static function encrypt(
#[\SensitiveParameter]
string $plaintext,
$publicKey,
int $padding = OPENSSL_PKCS1_OAEP_PADDING
): string
{
self::paddingModeLimitedCheck($padding);
if (!openssl_public_encrypt($plaintext, $encrypted, $publicKey, $padding)) {
throw new UnexpectedValueException('Encrypting the input $plaintext failed, please checking your $publicKey whether or nor correct.');
}
return base64_encode($encrypted);
}