Skip to content

合单关闭订单

合单支付订单只能使用此合单关单api完成关单。

请求参数类型描述
combine_out_trade_nostring合单商户订单号
jsonobject声明请求的JSON数据结构
combine_appidstring合单商户appid
sub_ordersobject[]子单信息
mchidstring子单商户号
out_trade_nostring子单商户订单号
sub_mchidstring二级商户号
sub_appidstring子商户应用ID
php
$instance->v3->combineTransactions->outTradeNo->_combine_out_trade_no_->close->postAsync([
  'combine_out_trade_no' => '',
  'json' => [
    'combine_appid' => 'wxd678efh567hg6787',
    'sub_orders' => [[
      'mchid' => '1900000109',
      'out_trade_no' => '20150806125346',
      'sub_mchid' => '1900000109',
      'sub_appid' => 'wxd678efh567hg6999',
    ],],
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r($response->getStatusCode() === 204);
})
->wait();
php
$instance->chain('v3/combine-transactions/out-trade-no/{combine_out_trade_no}/close')->postAsync([
  'combine_out_trade_no' => '',
  'json' => [
    'combine_appid' => 'wxd678efh567hg6787',
    'sub_orders' => [[
      'mchid' => '1900000109',
      'out_trade_no' => '20150806125346',
      'sub_mchid' => '1900000109',
      'sub_appid' => 'wxd678efh567hg6999',
    ],],
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r($response->getStatusCode() === 204);
})
->wait();
php
$instance['v3/combine-transactions/out-trade-no/{combine_out_trade_no}/close']->postAsync([
  'combine_out_trade_no' => '',
  'json' => [
    'combine_appid' => 'wxd678efh567hg6787',
    'sub_orders' => [[
      'mchid' => '1900000109',
      'out_trade_no' => '20150806125346',
      'sub_mchid' => '1900000109',
      'sub_appid' => 'wxd678efh567hg6999',
    ],],
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r($response->getStatusCode() === 204);
})
->wait();
php
$response = $instance->v3->combineTransactions->outTradeNo->_combine_out_trade_no_->close->post([
  'combine_out_trade_no' => '',
  'json' => [
    'combine_appid' => 'wxd678efh567hg6787',
    'sub_orders' => [[
      'mchid' => '1900000109',
      'out_trade_no' => '20150806125346',
      'sub_mchid' => '1900000109',
      'sub_appid' => 'wxd678efh567hg6999',
    ],],
  ],
]);
print_r($response->getStatusCode() === 204);
php
$response = $instance->chain('v3/combine-transactions/out-trade-no/{combine_out_trade_no}/close')->post([
  'combine_out_trade_no' => '',
  'json' => [
    'combine_appid' => 'wxd678efh567hg6787',
    'sub_orders' => [[
      'mchid' => '1900000109',
      'out_trade_no' => '20150806125346',
      'sub_mchid' => '1900000109',
      'sub_appid' => 'wxd678efh567hg6999',
    ],],
  ],
]);
print_r($response->getStatusCode() === 204);
php
$response = $instance['v3/combine-transactions/out-trade-no/{combine_out_trade_no}/close']->post([
  'combine_out_trade_no' => '',
  'json' => [
    'combine_appid' => 'wxd678efh567hg6787',
    'sub_orders' => [[
      'mchid' => '1900000109',
      'out_trade_no' => '20150806125346',
      'sub_mchid' => '1900000109',
      'sub_appid' => 'wxd678efh567hg6999',
    ],],
  ],
]);
print_r($response->getStatusCode() === 204);
返回字典类型描述
空字符串(无返回内容)

参阅 官方文档

Published on the GitHub by TheNorthMemory