Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

是否可以加入微信收款(个人转账版)服务接口 #970

Closed
chenhaizano opened this issue Oct 22, 2017 · 7 comments
Closed

是否可以加入微信收款(个人转账版)服务接口 #970

chenhaizano opened this issue Oct 22, 2017 · 7 comments

Comments

@chenhaizano
Copy link
Contributor

简介

为规范服务商下属个人用户的接入,服务商需将个人用户基本资料提交给微信支付,微信支付返回下属个人用户的收款识别码。因为用户的数量较多,服务商可以直接调用该系列 API 实现高效快捷的录入个人用户的资料。

1. 新增收款个人用户资料 API

'https://api.mch.weixin.qq.com/secapi/mch/submchmanage?action=add'

2. 查询收款个人用户资料 API

'https://api.mch.weixin.qq.com/secapi/mch/submchmanage?action=query'

需要我提供文档么?

@chenhaizano chenhaizano changed the title 是否可用加入微信收款(个人转账版)服务接口 是否可以加入微信收款(个人转账版)服务接口 Oct 22, 2017
@mingyoung
Copy link
Collaborator

文档看看

@mingyoung
Copy link
Collaborator

mingyoung commented Oct 25, 2017

PR #983

// 新增收款个人用户资料
$app->merchant->addSubMerchant([
    'merchant_name' => '店铺名称',
    'merchant_shortname' => '简称',
    'recipient_name' => '姓名',
    'recipient_idcardno' => '111111111111111111', // 身份证
    'recipient_wechatid' => 'wechat-id',
    // ...
]);

// 查询收款个人用户资料
$app->merchant->querySubMerchantByMerchantId('xxx'); // 根据收款识别码查询
$app->merchant->querySubMerchantByWeChatId('xxx'); // 根据收款人微信号查询

@chenhaizano
Copy link
Contributor Author

@mingyoung

现在发现一个问题,有不存在的字段参与签名,微信会返回错误提示:签名校验失败,请检查后重试

https://github.com/overtrue/wechat/blob/62945e1bada42823becb3ac88520a0a8b6c7ab45/src/Payment/Kernel/BaseClient.php#L64-L96

现在 nonce_str 参数是一直会存在,但现在不需要这个参数

'nonce_str' => uniqid() 

我尝试注释nonce_str等字段能正常返回数据

这个问题需要解决一下

@chenhaizano
Copy link
Contributor Author

chenhaizano commented Oct 27, 2017

能否这样改?


https://github.com/overtrue/wechat/blob/62945e1bada42823becb3ac88520a0a8b6c7ab45/src/Payment/Merchant/Client.php#L67-L76

覆盖掉之前的?

$params = array_merge($params, [
    'nonce_str' => '',
    'sub_mch_id' => '',
    'sub_appid' => ''
]);

@mingyoung
Copy link
Collaborator

@chenhaizano 可以,提个 PR 呗👀

@chenhaizano
Copy link
Contributor Author

#986

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants