向员工付款
给同一个实名用户付款,单笔单日限额200/200元;一个商户同一日付款总额限额10W;不支持给非实名用户打款;单笔最小金额默认为1元。
请求参数 | 类型 | 描述 |
---|---|---|
xml | object | 声明请求的XML 数据结构 |
appid | string | 公众账号appid |
mchid | string | 商户号 |
device_info | string | 设备号 |
partner_trade_no | string | 商户订单号 |
openid | string | 用户openid |
check_name | string | 校验用户姓名选项 |
re_user_name | string | 收款用户姓名 |
amount | integer | 金额 |
desc | string | 企业付款备注 |
spbill_create_ip | string | Ip地址 |
workwx_sign | string | 活动信息 |
ww_msg_type | string | 付款消息类型 |
approval_number | string | 付款消息类型 |
approval_type | number | 审批类型 |
act_name | string | 项目名称 |
agentid | number | 付款的应用id |
security | boolean | 声明加载商户API证书 固定值 true |
php
$instance->v2->mmpaymkttransfers->promotion->paywwsptrans2pocket->postAsync([
'xml' => [
'appid' => 'wx8888888888888888',
'mchid' => '1900000109',
'device_info' => '013467007045764',
'partner_trade_no' => '10000098201411111234567890',
'openid' => 'oxTWIuGaIt6gTKsQRLau2M0yL16E',
'check_name' => 'FORCE_CHECK',
're_user_name' => '王小王',
'amount' => '10099',
'desc' => '六月出差报销费用',
'spbill_create_ip' => '192.168.0.1',
'workwx_sign' => 'C380BEC2BFD727A4B6845133519F3AD6',
'ww_msg_type' => 'NORMAL_MSG',
'approval_number' => '201705160008',
'approval_type' => '1',
'act_name' => '产品部门报销',
'agentid' => '1',
],
'security' => true,
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
})
->wait();
php
$instance->chain('v2/mmpaymkttransfers/promotion/paywwsptrans2pocket')->postAsync([
'xml' => [
'appid' => 'wx8888888888888888',
'mchid' => '1900000109',
'device_info' => '013467007045764',
'partner_trade_no' => '10000098201411111234567890',
'openid' => 'oxTWIuGaIt6gTKsQRLau2M0yL16E',
'check_name' => 'FORCE_CHECK',
're_user_name' => '王小王',
'amount' => '10099',
'desc' => '六月出差报销费用',
'spbill_create_ip' => '192.168.0.1',
'workwx_sign' => 'C380BEC2BFD727A4B6845133519F3AD6',
'ww_msg_type' => 'NORMAL_MSG',
'approval_number' => '201705160008',
'approval_type' => '1',
'act_name' => '产品部门报销',
'agentid' => '1',
],
'security' => true,
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
})
->wait();
php
$instance['v2/mmpaymkttransfers/promotion/paywwsptrans2pocket']->postAsync([
'xml' => [
'appid' => 'wx8888888888888888',
'mchid' => '1900000109',
'device_info' => '013467007045764',
'partner_trade_no' => '10000098201411111234567890',
'openid' => 'oxTWIuGaIt6gTKsQRLau2M0yL16E',
'check_name' => 'FORCE_CHECK',
're_user_name' => '王小王',
'amount' => '10099',
'desc' => '六月出差报销费用',
'spbill_create_ip' => '192.168.0.1',
'workwx_sign' => 'C380BEC2BFD727A4B6845133519F3AD6',
'ww_msg_type' => 'NORMAL_MSG',
'approval_number' => '201705160008',
'approval_type' => '1',
'act_name' => '产品部门报销',
'agentid' => '1',
],
'security' => true,
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
})
->wait();
php
$response = $instance->v2->mmpaymkttransfers->promotion->paywwsptrans2pocket->post([
'xml' => [
'appid' => 'wx8888888888888888',
'mchid' => '1900000109',
'device_info' => '013467007045764',
'partner_trade_no' => '10000098201411111234567890',
'openid' => 'oxTWIuGaIt6gTKsQRLau2M0yL16E',
'check_name' => 'FORCE_CHECK',
're_user_name' => '王小王',
'amount' => '10099',
'desc' => '六月出差报销费用',
'spbill_create_ip' => '192.168.0.1',
'workwx_sign' => 'C380BEC2BFD727A4B6845133519F3AD6',
'ww_msg_type' => 'NORMAL_MSG',
'approval_number' => '201705160008',
'approval_type' => '1',
'act_name' => '产品部门报销',
'agentid' => '1',
],
'security' => true,
]);
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
php
$response = $instance->chain('v2/mmpaymkttransfers/promotion/paywwsptrans2pocket')->post([
'xml' => [
'appid' => 'wx8888888888888888',
'mchid' => '1900000109',
'device_info' => '013467007045764',
'partner_trade_no' => '10000098201411111234567890',
'openid' => 'oxTWIuGaIt6gTKsQRLau2M0yL16E',
'check_name' => 'FORCE_CHECK',
're_user_name' => '王小王',
'amount' => '10099',
'desc' => '六月出差报销费用',
'spbill_create_ip' => '192.168.0.1',
'workwx_sign' => 'C380BEC2BFD727A4B6845133519F3AD6',
'ww_msg_type' => 'NORMAL_MSG',
'approval_number' => '201705160008',
'approval_type' => '1',
'act_name' => '产品部门报销',
'agentid' => '1',
],
'security' => true,
]);
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
php
$response = $instance['v2/mmpaymkttransfers/promotion/paywwsptrans2pocket']->post([
'xml' => [
'appid' => 'wx8888888888888888',
'mchid' => '1900000109',
'device_info' => '013467007045764',
'partner_trade_no' => '10000098201411111234567890',
'openid' => 'oxTWIuGaIt6gTKsQRLau2M0yL16E',
'check_name' => 'FORCE_CHECK',
're_user_name' => '王小王',
'amount' => '10099',
'desc' => '六月出差报销费用',
'spbill_create_ip' => '192.168.0.1',
'workwx_sign' => 'C380BEC2BFD727A4B6845133519F3AD6',
'ww_msg_type' => 'NORMAL_MSG',
'approval_number' => '201705160008',
'approval_type' => '1',
'act_name' => '产品部门报销',
'agentid' => '1',
],
'security' => true,
]);
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
返回字典 | 类型 | 描述 |
---|---|---|
return_code | string | 返回状态码 |
return_msg | string | 返回信息 |
appid | string | 公众账号appid |
mchid | string | 商户号 |
device_info | string | 设备号 |
nonce_str | string | 随机字符串 |
result_code | string | 业务结果 |
err_code | string | 错误代码 |
err_code_des | string | 错误代码描述 |
partner_trade_no | string | 商户订单号 |
payment_no | string | 微信付款单号 |
payment_time | string | 付款成功时间 |
参阅 官方文档