Skip to content

同步服务订单信息

由于收款商户进行的某些“线下操作”会导致微信支付侧的订单状态与实际情况不符。**前置条件:**同步商户渠道收款成功信息时,即场景类型=“Order_Paid”,订单的状态需为

请求参数类型描述
out_order_nostring商户服务订单号
jsonobject声明请求的JSON数据结构
appidstring公众账号ID
service_idstring服务ID
typestring场景类型
detailobject内容信息详情
paid_timestring收款成功时间
php
$instance->v3->payscore->serviceorder->_out_order_no_->sync->postAsync([
  'out_order_no' => '1234323JKHDFE1243252',
  'json' => [
    'appid'      => 'wxd678efh567hg6787',
    'service_id' => '500001',
    'type'       => 'Order_Paid',
    'detail'     => [
      'paid_time' => '20091225091210',
    ],
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/payscore/serviceorder/{out_order_no}/sync')->postAsync([
  'out_order_no' => '1234323JKHDFE1243252',
  'json' => [
    'appid'      => 'wxd678efh567hg6787',
    'service_id' => '500001',
    'type'       => 'Order_Paid',
    'detail'     => [
      'paid_time' => '20091225091210',
    ],
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/payscore/serviceorder/{out_order_no}/sync']->postAsync([
  'out_order_no' => '1234323JKHDFE1243252',
  'json' => [
    'appid'      => 'wxd678efh567hg6787',
    'service_id' => '500001',
    'type'       => 'Order_Paid',
    'detail'     => [
      'paid_time' => '20091225091210',
    ],
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->payscore->serviceorder->_out_order_no_->sync->post([
  'out_order_no' => '1234323JKHDFE1243252',
  'json' => [
    'appid'      => 'wxd678efh567hg6787',
    'service_id' => '500001',
    'type'       => 'Order_Paid',
    'detail'     => [
      'paid_time' => '20091225091210',
    ],
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/payscore/serviceorder/{out_order_no}/sync')->post([
  'out_order_no' => '1234323JKHDFE1243252',
  'json' => [
    'appid'      => 'wxd678efh567hg6787',
    'service_id' => '500001',
    'type'       => 'Order_Paid',
    'detail'     => [
      'paid_time' => '20091225091210',
    ],
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/payscore/serviceorder/{out_order_no}/sync']->post([
  'out_order_no' => '1234323JKHDFE1243252',
  'json' => [
    'appid'      => 'wxd678efh567hg6787',
    'service_id' => '500001',
    'type'       => 'Order_Paid',
    'detail'     => [
      'paid_time' => '20091225091210',
    ],
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典类型描述
out_order_nostring商户服务订单号
service_idstring服务ID
appidstring服务商公众号ID
mchidstring服务商商户号
service_introductionstring服务信息
statestring服务订单状态
state_descriptionstring订单状态说明
post_paymentsobject[]后付费项目
namestring付费名称
amountnumber付费金额
descriptionstring付费说明
countnumber付费数量
post_discountsobject[]商户优惠
namestring优惠名称
descriptionstring优惠说明
amountnumber优惠金额
risk_fundobject服务风险金
namestring风险名称
amountnumber风险金额
descriptionstring风险说明
total_amountnumber总金额
need_collectionboolean是否需要收款
collectionobject收款信息
statestring收款状态
total_amountnumber总收款金额
paying_amountnumber待收金额
paid_amountnumber已收金额
detailsobject[]收款明细列表
amountnumber单笔收款金额
paid_typestring收款成功渠道
paid_timestring收款成功时间
transaction_idstring微信支付交易单号
bank_typestring收款银行
time_rangeobject服务时间
start_timestring服务开始时间
end_timestring服务结束时间
start_time_remarkstring服务开始时间备注
end_time_remarkstring服务结束时间备注
locationobject服务位置
start_locationstring服务开始地点
end_locationstring服务结束地点
attachstring附加数据
notify_urlstring商户回调地址
openidstring服务商公众号下的用户标识
order_idstring微信支付服务订单号

参阅 [FINISHED:商户完结订单] 官方文档 官方文档

Published on the GitHub by TheNorthMemory