Skip to content

从业机构取消微信支付分订单

前置条件:服务订单状态为“已创建”或“进行中”

请求参数类型描述
out_order_nostring商户服务订单号
jsonobject声明请求的JSON数据结构
service_idstring服务ID
channel_idstring渠道商商户号
sub_mchidstring子商户号
reasonstring撤销原因
php
$instance->v3->payscore->acquiringbank->serviceorder->_out_order_no_->cancel->postAsync([
  'out_order_no' => '1234323JKHDFE1243252',
  'json' => [
    'service_id' => '2002000000000558128851361561536',
    'channel_id' => '1230000109',
    'sub_mchid'  => '1900000109',
    'reason'     => '用户投诉',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r($response->getStatusCode() === 204);
})
->wait();
php
$instance->chain('v3/payscore/acquiringbank/serviceorder/{out_order_no}/cancel')->postAsync([
  'out_order_no' => '1234323JKHDFE1243252',
  'json' => [
    'service_id' => '2002000000000558128851361561536',
    'channel_id' => '1230000109',
    'sub_mchid'  => '1900000109',
    'reason'     => '用户投诉',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r($response->getStatusCode() === 204);
})
->wait();
php
$instance['v3/payscore/acquiringbank/serviceorder/{out_order_no}/cancel']->postAsync([
  'out_order_no' => '1234323JKHDFE1243252',
  'json' => [
    'service_id' => '2002000000000558128851361561536',
    'channel_id' => '1230000109',
    'sub_mchid'  => '1900000109',
    'reason'     => '用户投诉',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r($response->getStatusCode() === 204);
})
->wait();
php
$response = $instance->v3->payscore->acquiringbank->serviceorder->_out_order_no_->cancel->post([
  'out_order_no' => '1234323JKHDFE1243252',
  'json' => [
    'service_id' => '2002000000000558128851361561536',
    'channel_id' => '1230000109',
    'sub_mchid'  => '1900000109',
    'reason'     => '用户投诉',
  ],
]);
print_r($response->getStatusCode() === 204);
php
$response = $instance->chain('v3/payscore/acquiringbank/serviceorder/{out_order_no}/cancel')->post([
  'out_order_no' => '1234323JKHDFE1243252',
  'json' => [
    'service_id' => '2002000000000558128851361561536',
    'channel_id' => '1230000109',
    'sub_mchid'  => '1900000109',
    'reason'     => '用户投诉',
  ],
]);
print_r($response->getStatusCode() === 204);
php
$response = $instance['v3/payscore/acquiringbank/serviceorder/{out_order_no}/cancel']->post([
  'out_order_no' => '1234323JKHDFE1243252',
  'json' => [
    'service_id' => '2002000000000558128851361561536',
    'channel_id' => '1230000109',
    'sub_mchid'  => '1900000109',
    'reason'     => '用户投诉',
  ],
]);
print_r($response->getStatusCode() === 204);
返回字典类型描述
空字符串(无返回内容)

参阅 官方文档

Published on the GitHub by TheNorthMemory