合单下单-H5支付
使用合单支付接口,用户只输入一次密码,即可完成多个订单的支付。目前最多一次可支持50笔订单进行合单支付。
请求参数 | 类型 | 描述 |
---|---|---|
json | object | 声明请求的JSON 数据结构 |
combine_appid | string | 合单商户appid |
combine_mchid | string | 合单商户号 |
combine_out_trade_no | string | 合单商户订单号 |
scene_info | object | 场景信息 |
device_id | string | 商户端设备号 |
payer_client_ip | string | 用户终端IP |
h5_info | object | H5场景信息 |
type | string | 场景类型 |
app_name | string | 应用名称 |
app_url | string | 网站URL |
bundle_id | string | iOS平台BundleID |
package_name | string | Android平台PackageName |
sub_orders | object[] | 子单信息 |
mchid | string | 子单商户号 |
attach | string | 附加数据 |
amount | object | 订单金额 |
total_amount | integer | 标价金额 |
currency | string | 标价币种 |
out_trade_no | string | 子单商户订单号 |
sub_mchid | string | 二级商户号 |
goods_tag | string | 订单优惠标记 |
description | string | 商品描述 |
settle_info | object | 结算信息 |
profit_sharing | boolean | 是否指定分账 |
subsidy_amount | integer | 补差金额 |
sub_appid | string | 子商户应用ID |
time_start | string | 交易起始时间 |
time_expire | string | 交易结束时间 |
notify_url | string | 通知地址 |
limit_pay | string[] | no_balance | no_debit | balance_only 枚举值之一 |
combine_payer_info | object | 支付者 |
openid | string | 用户标识 |
sub_openid | string | 用户子标识 |
php
$instance->v3->combineTransactions->h5->postAsync([
'json' => [
'combine_appid' => 'wxd678efh567hg6787',
'combine_mchid' => '1900000109',
'combine_out_trade_no' => 'P20150806125346',
'scene_info' => [
'device_id' => 'POS1:1',
'payer_client_ip' => '14.17.22.32',
'h5_info' => [
'type' => 'iOS',
'app_name' => '王者荣耀',
'app_url' => 'https://pay.qq.com',
'bundle_id' => 'com.tencent.wzryiOS',
'package_name' => 'com.tencent.tmgp.sgame',
],
],
'sub_orders' => [[
'mchid' => '1900000109',
'attach' => '深圳分店',
'amount' => [
'total_amount' => 100,
'currency' => 'CNY',
],
'out_trade_no' => '20150806125346',
'sub_mchid' => '1900000109',
'goods_tag' => 'WXG',
'description' => '腾讯充值中心-QQ会员充值',
'settle_info' => [
'profit_sharing' => true,
'subsidy_amount' => 10,
],
'sub_appid' => 'wxd678efh567hg6999',
],],
'time_start' => '2019-12-31T15:59:60+08:00',
'time_expire' => '2019-12-31T15:59:60+08:00',
'notify_url' => 'https://yourapp.com/notify',
'limit_pay' => ['string'],
'combine_payer_info' => [
'openid' => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
'sub_openid' => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
],
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/combine-transactions/h5')->postAsync([
'json' => [
'combine_appid' => 'wxd678efh567hg6787',
'combine_mchid' => '1900000109',
'combine_out_trade_no' => 'P20150806125346',
'scene_info' => [
'device_id' => 'POS1:1',
'payer_client_ip' => '14.17.22.32',
'h5_info' => [
'type' => 'iOS',
'app_name' => '王者荣耀',
'app_url' => 'https://pay.qq.com',
'bundle_id' => 'com.tencent.wzryiOS',
'package_name' => 'com.tencent.tmgp.sgame',
],
],
'sub_orders' => [[
'mchid' => '1900000109',
'attach' => '深圳分店',
'amount' => [
'total_amount' => 100,
'currency' => 'CNY',
],
'out_trade_no' => '20150806125346',
'sub_mchid' => '1900000109',
'goods_tag' => 'WXG',
'description' => '腾讯充值中心-QQ会员充值',
'settle_info' => [
'profit_sharing' => true,
'subsidy_amount' => 10,
],
'sub_appid' => 'wxd678efh567hg6999',
],],
'time_start' => '2019-12-31T15:59:60+08:00',
'time_expire' => '2019-12-31T15:59:60+08:00',
'notify_url' => 'https://yourapp.com/notify',
'limit_pay' => ['string'],
'combine_payer_info' => [
'openid' => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
'sub_openid' => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
],
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/combine-transactions/h5']->postAsync([
'json' => [
'combine_appid' => 'wxd678efh567hg6787',
'combine_mchid' => '1900000109',
'combine_out_trade_no' => 'P20150806125346',
'scene_info' => [
'device_id' => 'POS1:1',
'payer_client_ip' => '14.17.22.32',
'h5_info' => [
'type' => 'iOS',
'app_name' => '王者荣耀',
'app_url' => 'https://pay.qq.com',
'bundle_id' => 'com.tencent.wzryiOS',
'package_name' => 'com.tencent.tmgp.sgame',
],
],
'sub_orders' => [[
'mchid' => '1900000109',
'attach' => '深圳分店',
'amount' => [
'total_amount' => 100,
'currency' => 'CNY',
],
'out_trade_no' => '20150806125346',
'sub_mchid' => '1900000109',
'goods_tag' => 'WXG',
'description' => '腾讯充值中心-QQ会员充值',
'settle_info' => [
'profit_sharing' => true,
'subsidy_amount' => 10,
],
'sub_appid' => 'wxd678efh567hg6999',
],],
'time_start' => '2019-12-31T15:59:60+08:00',
'time_expire' => '2019-12-31T15:59:60+08:00',
'notify_url' => 'https://yourapp.com/notify',
'limit_pay' => ['string'],
'combine_payer_info' => [
'openid' => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
'sub_openid' => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
],
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->combineTransactions->h5->post([
'json' => [
'combine_appid' => 'wxd678efh567hg6787',
'combine_mchid' => '1900000109',
'combine_out_trade_no' => 'P20150806125346',
'scene_info' => [
'device_id' => 'POS1:1',
'payer_client_ip' => '14.17.22.32',
'h5_info' => [
'type' => 'iOS',
'app_name' => '王者荣耀',
'app_url' => 'https://pay.qq.com',
'bundle_id' => 'com.tencent.wzryiOS',
'package_name' => 'com.tencent.tmgp.sgame',
],
],
'sub_orders' => [[
'mchid' => '1900000109',
'attach' => '深圳分店',
'amount' => [
'total_amount' => 100,
'currency' => 'CNY',
],
'out_trade_no' => '20150806125346',
'sub_mchid' => '1900000109',
'goods_tag' => 'WXG',
'description' => '腾讯充值中心-QQ会员充值',
'settle_info' => [
'profit_sharing' => true,
'subsidy_amount' => 10,
],
'sub_appid' => 'wxd678efh567hg6999',
],],
'time_start' => '2019-12-31T15:59:60+08:00',
'time_expire' => '2019-12-31T15:59:60+08:00',
'notify_url' => 'https://yourapp.com/notify',
'limit_pay' => ['string'],
'combine_payer_info' => [
'openid' => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
'sub_openid' => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
],
],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/combine-transactions/h5')->post([
'json' => [
'combine_appid' => 'wxd678efh567hg6787',
'combine_mchid' => '1900000109',
'combine_out_trade_no' => 'P20150806125346',
'scene_info' => [
'device_id' => 'POS1:1',
'payer_client_ip' => '14.17.22.32',
'h5_info' => [
'type' => 'iOS',
'app_name' => '王者荣耀',
'app_url' => 'https://pay.qq.com',
'bundle_id' => 'com.tencent.wzryiOS',
'package_name' => 'com.tencent.tmgp.sgame',
],
],
'sub_orders' => [[
'mchid' => '1900000109',
'attach' => '深圳分店',
'amount' => [
'total_amount' => 100,
'currency' => 'CNY',
],
'out_trade_no' => '20150806125346',
'sub_mchid' => '1900000109',
'goods_tag' => 'WXG',
'description' => '腾讯充值中心-QQ会员充值',
'settle_info' => [
'profit_sharing' => true,
'subsidy_amount' => 10,
],
'sub_appid' => 'wxd678efh567hg6999',
],],
'time_start' => '2019-12-31T15:59:60+08:00',
'time_expire' => '2019-12-31T15:59:60+08:00',
'notify_url' => 'https://yourapp.com/notify',
'limit_pay' => ['string'],
'combine_payer_info' => [
'openid' => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
'sub_openid' => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
],
],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/combine-transactions/h5']->post([
'json' => [
'combine_appid' => 'wxd678efh567hg6787',
'combine_mchid' => '1900000109',
'combine_out_trade_no' => 'P20150806125346',
'scene_info' => [
'device_id' => 'POS1:1',
'payer_client_ip' => '14.17.22.32',
'h5_info' => [
'type' => 'iOS',
'app_name' => '王者荣耀',
'app_url' => 'https://pay.qq.com',
'bundle_id' => 'com.tencent.wzryiOS',
'package_name' => 'com.tencent.tmgp.sgame',
],
],
'sub_orders' => [[
'mchid' => '1900000109',
'attach' => '深圳分店',
'amount' => [
'total_amount' => 100,
'currency' => 'CNY',
],
'out_trade_no' => '20150806125346',
'sub_mchid' => '1900000109',
'goods_tag' => 'WXG',
'description' => '腾讯充值中心-QQ会员充值',
'settle_info' => [
'profit_sharing' => true,
'subsidy_amount' => 10,
],
'sub_appid' => 'wxd678efh567hg6999',
],],
'time_start' => '2019-12-31T15:59:60+08:00',
'time_expire' => '2019-12-31T15:59:60+08:00',
'notify_url' => 'https://yourapp.com/notify',
'limit_pay' => ['string'],
'combine_payer_info' => [
'openid' => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
'sub_openid' => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
],
],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典 | 类型 | 描述 |
---|---|---|
h5_url | string | 支付跳转链接 |
参阅 官方文档