查询订单
可通过“微信订单号”和“商户订单号”两种方式查单,两种方式查单,返回结果相同。
请求参数 | 类型 | 描述 |
---|---|---|
transaction_id | string | 微信支付订单号 |
query | object | 声明请求的查询参数 |
sub_mchid | string | 特约商户号 |
php
$instance->v3->vehicle->etc->transactions->id->_transaction_id_->getAsync([
'transaction_id' => '25012014070332333018',
'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/vehicle/etc/transactions/id/{transaction_id}')->getAsync([
'transaction_id' => '25012014070332333018',
'query' => [
'sub_mchid' => '1900000109',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/vehicle/etc/transactions/id/{transaction_id}']->getAsync([
'transaction_id' => '25012014070332333018',
'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->vehicle->etc->transactions->id->_transaction_id_->get([
'transaction_id' => '25012014070332333018',
'query' => [
'sub_mchid' => '1900000109',
],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/vehicle/etc/transactions/id/{transaction_id}')->get([
'transaction_id' => '25012014070332333018',
'query' => [
'sub_mchid' => '1900000109',
],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/vehicle/etc/transactions/id/{transaction_id}']->get([
'transaction_id' => '25012014070332333018',
'query' => [
'sub_mchid' => '1900000109',
],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典 | 类型 | 描述 |
---|---|---|
mchid | string | 商户号 |
sub_mchid | string | 特约商户号 |
appid | string | 商户appid |
sub_appid | string | 特约商户appid |
out_trade_no | string | 商户订单号 |
transaction_id | string | 微信支付订单号 |
attach | string | 商户数据 |
trade_type | string | 交易类型 |
bank_type | string | 付款银行 |
success_time | string | 支付完成时间 |
trade_state | string | 交易状态 |
trade_state_desc | string | 交易状态描述 |
payer | object | 支付者 |
sp_openid | string | 用户在服务商APP的标识 |
sub_openid | string | 用户在特约商户APP的标识 |
amount | object | 订单金额 |
total | integer | 订单金额 |
currency | string | 货币类型 |
payer_total | integer | 用户实际支付金额 |
discount_total | integer | 折扣 |
device_info | object | 设备信息 |
device_id | string | 商户端设备号 |
device_ip | string | 商户端设备IP |
promotion_detail | object[] | 优惠详情 |
promotion_id | string | 券ID |
name | string | 优惠名称 |
scope | string | 优惠范围 |
type | string | 优惠类型 |
activity_id | string | 活动ID |
amount | integer | 优惠券面额 |
wxpay_contribute | integer | 微信出资 |
merchant_contribute | integer | 商户出资 |
other_contribute | integer | 其他出资 |
参阅 官方文档