Skip to content

电商合单委托代扣撤销订单

商户可以通过该接口发起免密的合单撤销

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

参阅 官方文档

Published on the GitHub by TheNorthMemory