Skip to content

商户订单号查单

通过商户订单号查询微信支付订单

请求参数类型描述
out_trade_nostring商户订单号
queryobject声明请求的查询参数
sub_mchidstring子商户号
php
$instance->v3->eduschoolpay->transactions->outTradeNo->_out_trade_no_->getAsync([
  'out_trade_no' => '201407033233368018',
  'query' => [
    'sub_mchid' => '1900000109',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/eduschoolpay/transactions/out-trade-no/{out_trade_no}')->getAsync([
  'out_trade_no' => '201407033233368018',
  'query' => [
    'sub_mchid' => '1900000109',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/eduschoolpay/transactions/out-trade-no/{out_trade_no}']->getAsync([
  'out_trade_no' => '201407033233368018',
  'query' => [
    'sub_mchid' => '1900000109',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->eduschoolpay->transactions->outTradeNo->_out_trade_no_->get([
  'out_trade_no' => '201407033233368018',
  'query' => [
    'sub_mchid' => '1900000109',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/eduschoolpay/transactions/out-trade-no/{out_trade_no}')->get([
  'out_trade_no' => '201407033233368018',
  'query' => [
    'sub_mchid' => '1900000109',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/eduschoolpay/transactions/out-trade-no/{out_trade_no}']->get([
  'out_trade_no' => '201407033233368018',
  'query' => [
    'sub_mchid' => '1900000109',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典类型描述
mchidstring商户号
appidstring商户appid
sub_mchidstring子商户号
sub_appidstring子商户appid
out_trade_nostring商户订单号
transaction_idstring微信支付订单号
trade_typestring交易类型
trade_statestring交易状态
trade_state_descstring交易状态描述
bank_typestring付款银行
attachstring商户数据
success_timestring支付完成时间
payerobject支付者
openidstring商户appid下的用户标识
sub_openidstring子商户appid下的用户标识
amountobject订单金额
totalinteger订单金额
payer_totalinteger用户支付金额
discount_totalinteger折扣
currencystring货币类型
device_infoobject设备信息
device_idstring设备号
device_ipstring商户端设备ip
promotion_detailobject[]优惠详情
coupon_idstring券ID
namestring优惠名称
scopestring优惠范围
typestring优惠类型
amountinteger优惠券面额
stock_idstring活动ID
wechatpay_contributeinteger微信出资
merchant_contributeinteger商户出资
other_contributeinteger其他出资

参阅 官方文档

Published on the GitHub by TheNorthMemory