企业付款到银行卡
企业付款业务是基于微信支付商户平台的资金管理能力,为了协助商户方便地实现企业向银行卡付款,针对部分有开发能力的商户,提供通过API完成企业付款到银行卡的功能。
请求参数 | 类型 | 描述 |
---|---|---|
security | true | 声明加载商户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 | 付款说明 |
php
$instance->v2->mmpaysptrans->pay_bank->postAsync([
'security' => true,
'xml' => [
'mch_id' => '1900000109',
'partner_trade_no' => '1212121221227',
'enc_bank_no' => '8609cb22e1774a50a930e414cc71eca06121bcd266335cda230d24a7886a8d9f',
'enc_true_name' => 'ca775af5f841bdf424b2e6eb86a6e21e',
'bank_code' => '1001',
'amount' => '100000',
'desc' => '理财',
],
])
->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([
'security' => true,
'xml' => [
'mch_id' => '1900000109',
'partner_trade_no' => '1212121221227',
'enc_bank_no' => '8609cb22e1774a50a930e414cc71eca06121bcd266335cda230d24a7886a8d9f',
'enc_true_name' => 'ca775af5f841bdf424b2e6eb86a6e21e',
'bank_code' => '1001',
'amount' => '100000',
'desc' => '理财',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
})
->wait();
php
$instance['v2/mmpaysptrans/pay_bank']->postAsync([
'security' => true,
'xml' => [
'mch_id' => '1900000109',
'partner_trade_no' => '1212121221227',
'enc_bank_no' => '8609cb22e1774a50a930e414cc71eca06121bcd266335cda230d24a7886a8d9f',
'enc_true_name' => 'ca775af5f841bdf424b2e6eb86a6e21e',
'bank_code' => '1001',
'amount' => '100000',
'desc' => '理财',
],
])
->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([
'security' => true,
'xml' => [
'mch_id' => '1900000109',
'partner_trade_no' => '1212121221227',
'enc_bank_no' => '8609cb22e1774a50a930e414cc71eca06121bcd266335cda230d24a7886a8d9f',
'enc_true_name' => 'ca775af5f841bdf424b2e6eb86a6e21e',
'bank_code' => '1001',
'amount' => '100000',
'desc' => '理财',
],
]);
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
php
$response = $instance->chain('v2/mmpaysptrans/pay_bank')->post([
'security' => true,
'xml' => [
'mch_id' => '1900000109',
'partner_trade_no' => '1212121221227',
'enc_bank_no' => '8609cb22e1774a50a930e414cc71eca06121bcd266335cda230d24a7886a8d9f',
'enc_true_name' => 'ca775af5f841bdf424b2e6eb86a6e21e',
'bank_code' => '1001',
'amount' => '100000',
'desc' => '理财',
],
]);
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
php
$response = $instance['v2/mmpaysptrans/pay_bank']->post([
'security' => true,
'xml' => [
'mch_id' => '1900000109',
'partner_trade_no' => '1212121221227',
'enc_bank_no' => '8609cb22e1774a50a930e414cc71eca06121bcd266335cda230d24a7886a8d9f',
'enc_true_name' => 'ca775af5f841bdf424b2e6eb86a6e21e',
'bank_code' => '1001',
'amount' => '100000',
'desc' => '理财',
],
]);
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
返回字典 | 类型 | 描述 |
---|---|---|
return_code | string | 返回状态码SUCCESS | FAIL 枚举值之一 |
return_msg | string | 返回信息 |
result_code | string | 业务结果SUCCESS | FAIL 枚举值之一 |
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 | 手续费金额 |
参阅 官方文档