企业付款到银行卡
企业付款业务是基于微信支付商户平台的资金管理能力,为了协助商户方便地实现企业向银行卡付款,针对部分有开发能力的商户,提供通过API完成企业付款到银行卡的功能。
请求参数 | 类型 | 描述 |
---|---|---|
xml | object | 声明请求的XML 数据结构 |
mch_id | string | 商户号 |
partner_trade_no | string | 商户企业付款单号 |
enc_bank_no | string | 收款方银行卡号 |
enc_true_name | string | 收款方用户名 |
bank_code | string | 收款方开户行 |
amount | integer | 付款金额 |
desc | string | 付款说明 |
security | boolean | 声明加载商户API证书 固定值 true |
php
$instance->v2->mmpaysptrans->pay_bank->postAsync([
'xml' => [
'mch_id' => '1900000109',
'partner_trade_no' => '1212121221227',
'enc_bank_no' => '8609cb22e1774a50a930e414cc71eca06121bcd266335cda230d24a7886a8d9f',
'enc_true_name' => 'ca775af5f841bdf424b2e6eb86a6e21e',
'bank_code' => '1001',
'amount' => '100000',
'desc' => '理财',
],
'security' => true,
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
})
->wait();
php
$instance->chain('v2/mmpaysptrans/pay_bank')->postAsync([
'xml' => [
'mch_id' => '1900000109',
'partner_trade_no' => '1212121221227',
'enc_bank_no' => '8609cb22e1774a50a930e414cc71eca06121bcd266335cda230d24a7886a8d9f',
'enc_true_name' => 'ca775af5f841bdf424b2e6eb86a6e21e',
'bank_code' => '1001',
'amount' => '100000',
'desc' => '理财',
],
'security' => true,
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
})
->wait();
php
$instance['v2/mmpaysptrans/pay_bank']->postAsync([
'xml' => [
'mch_id' => '1900000109',
'partner_trade_no' => '1212121221227',
'enc_bank_no' => '8609cb22e1774a50a930e414cc71eca06121bcd266335cda230d24a7886a8d9f',
'enc_true_name' => 'ca775af5f841bdf424b2e6eb86a6e21e',
'bank_code' => '1001',
'amount' => '100000',
'desc' => '理财',
],
'security' => true,
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
})
->wait();
php
$response = $instance->v2->mmpaysptrans->pay_bank->post([
'xml' => [
'mch_id' => '1900000109',
'partner_trade_no' => '1212121221227',
'enc_bank_no' => '8609cb22e1774a50a930e414cc71eca06121bcd266335cda230d24a7886a8d9f',
'enc_true_name' => 'ca775af5f841bdf424b2e6eb86a6e21e',
'bank_code' => '1001',
'amount' => '100000',
'desc' => '理财',
],
'security' => true,
]);
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
php
$response = $instance->chain('v2/mmpaysptrans/pay_bank')->post([
'xml' => [
'mch_id' => '1900000109',
'partner_trade_no' => '1212121221227',
'enc_bank_no' => '8609cb22e1774a50a930e414cc71eca06121bcd266335cda230d24a7886a8d9f',
'enc_true_name' => 'ca775af5f841bdf424b2e6eb86a6e21e',
'bank_code' => '1001',
'amount' => '100000',
'desc' => '理财',
],
'security' => true,
]);
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
php
$response = $instance['v2/mmpaysptrans/pay_bank']->post([
'xml' => [
'mch_id' => '1900000109',
'partner_trade_no' => '1212121221227',
'enc_bank_no' => '8609cb22e1774a50a930e414cc71eca06121bcd266335cda230d24a7886a8d9f',
'enc_true_name' => 'ca775af5f841bdf424b2e6eb86a6e21e',
'bank_code' => '1001',
'amount' => '100000',
'desc' => '理财',
],
'security' => true,
]);
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
返回字典 | 类型 | 描述 |
---|---|---|
return_code | string | 返回状态码 |
return_msg | string | 返回信息 |
result_code | string | 业务结果 |
err_code | string | 错误代码 |
err_code_des | string | 错误代码描述 |
mch_id | string | 商户号 |
partner_trade_no | string | 商户企业付款单号 |
amount | integer | 代付金额 |
nonce_str | string | 随机字符串 |
sign | string | 签名 |
payment_no | string | 微信企业付款单号 |
cmms_amt | integer | 手续费金额 |
参阅 官方文档