Skip to content

查单接口

请求参数类型描述
out_trade_nostring商户订单号
queryobject声明请求的查询参数
sp_mchidstring服务商商户号
sub_mchidstring子商户商户号
business_product_idstring平台产品ID
2 | 11 枚举值之一
php
$instance->v3->offlineface->transactions->outTradeNo->_out_trade_no_->getAsync([
  'out_trade_no' => '1217752501201407033233368018',
  'query' => [
    'sp_mchid'            => '198798777',
    'sub_mchid'           => '3233122121',
    'business_product_id' => '2',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/offlineface/transactions/out-trade-no/{out_trade_no}')->getAsync([
  'out_trade_no' => '1217752501201407033233368018',
  'query' => [
    'sp_mchid'            => '198798777',
    'sub_mchid'           => '3233122121',
    'business_product_id' => '2',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/offlineface/transactions/out-trade-no/{out_trade_no}']->getAsync([
  'out_trade_no' => '1217752501201407033233368018',
  'query' => [
    'sp_mchid'            => '198798777',
    'sub_mchid'           => '3233122121',
    'business_product_id' => '2',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->offlineface->transactions->outTradeNo->_out_trade_no_->get([
  'out_trade_no' => '1217752501201407033233368018',
  'query' => [
    'sp_mchid'            => '198798777',
    'sub_mchid'           => '3233122121',
    'business_product_id' => '2',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/offlineface/transactions/out-trade-no/{out_trade_no}')->get([
  'out_trade_no' => '1217752501201407033233368018',
  'query' => [
    'sp_mchid'            => '198798777',
    'sub_mchid'           => '3233122121',
    'business_product_id' => '2',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/offlineface/transactions/out-trade-no/{out_trade_no}']->get([
  'out_trade_no' => '1217752501201407033233368018',
  'query' => [
    'sp_mchid'            => '198798777',
    'sub_mchid'           => '3233122121',
    'business_product_id' => '2',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典类型描述
sp_appidstring服务商公众号appid
sp_mchidstring服务商商户号
sub_appidstring子商户公众号appid
sub_mchidstring子商户商户号
payerobject支付用户信息
sp_openidstring公众下的openid
sub_openidstring子公众下的openid
amountobject金额信息
totalinteger总金额
currencystring货币类型
CNY 枚举值
promotion_detailobject[]优惠信息
scene_infoobject支付场景信息
device_ipstring设备IP
bank_typestring付款银行
trade_typestring交易类型
NATIVE | JSAPI | APP | MWEB | AUTH 枚举值之一
trade_statestring交易状态
trade_state_descriptionstring交易描述
debt_statestring欠款状态
descriptionstring商品信息
attachstring商户附加信息
success_timestring支付成功时间
transaction_idstring微信订单号
repayment_transaction_idstring还款微信订单号
out_trade_nostring商户订单号
error_typestring错误分类

参阅 官方文档

Published on the GitHub by TheNorthMemory