创建及查询核销订单结果
创建核销订单
用户完成充值后,合作方必须调用该接口创建核销记录,并确保得到明确应答。 若调用失败,必须间隔一定时间后重试,否则会导致用户在集星光小程序中看到权益的使用状态与实际不符,进而引发用户投诉。
请求参数 | 类型 | 描述 |
---|---|---|
json | object | 声明请求的JSON 数据结构 |
appid | string | appid |
wechat_openid | string | 用户在appid下的唯一标识 |
string | 用户QQ账号 | |
right_id | string | 权益ID |
create_time | string | 权益核销时间 |
php
$instance->v3->eduStar->orders->postAsync([
'json' => [
'appid' => 'wx998877665544wx',
'wechat_openid' => 'oUpF8uMuAJOM2pxb1Q',
'qq' => '',
'right_id' => 'qw3Da21QRCNt',
'create_time' => '2018-05-23T12:13:50+08:00',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/edu-star/orders')->postAsync([
'json' => [
'appid' => 'wx998877665544wx',
'wechat_openid' => 'oUpF8uMuAJOM2pxb1Q',
'qq' => '',
'right_id' => 'qw3Da21QRCNt',
'create_time' => '2018-05-23T12:13:50+08:00',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/edu-star/orders']->postAsync([
'json' => [
'appid' => 'wx998877665544wx',
'wechat_openid' => 'oUpF8uMuAJOM2pxb1Q',
'qq' => '',
'right_id' => 'qw3Da21QRCNt',
'create_time' => '2018-05-23T12:13:50+08:00',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->eduStar->orders->post([
'json' => [
'appid' => 'wx998877665544wx',
'wechat_openid' => 'oUpF8uMuAJOM2pxb1Q',
'qq' => '',
'right_id' => 'qw3Da21QRCNt',
'create_time' => '2018-05-23T12:13:50+08:00',
],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/edu-star/orders')->post([
'json' => [
'appid' => 'wx998877665544wx',
'wechat_openid' => 'oUpF8uMuAJOM2pxb1Q',
'qq' => '',
'right_id' => 'qw3Da21QRCNt',
'create_time' => '2018-05-23T12:13:50+08:00',
],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/edu-star/orders']->post([
'json' => [
'appid' => 'wx998877665544wx',
'wechat_openid' => 'oUpF8uMuAJOM2pxb1Q',
'qq' => '',
'right_id' => 'qw3Da21QRCNt',
'create_time' => '2018-05-23T12:13:50+08:00',
],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典 | 类型 | 描述 |
---|---|---|
appid | string | appid |
wechat_openid | string | 用户在appid下的唯一标识 |
string | 用户QQ账号 | |
right_id | string | 权益ID |
create_time | string | 权益核销时间 |
order_state | string | 订单状态 |
order_id | string | 订单号 |
参阅 官方流程图
通过QQ账号查询核销订单列表
合作方通过调用该接口可获取核销订单信息。
请求参数 | 类型 | 描述 |
---|---|---|
query | object | 声明请求的查询参数 |
appid | string | appid |
wechat_openid | string | 用户在appid下的唯一标识 |
string | 用户QQ账号 | |
offset | integer | 分页页码 |
limit | integer | 分页大小 |
php
$instance->v3->eduStar->orders->getAsync([
'query' => [
'appid' => 'wx998877665544wx',
'wechat_openid' => 'oUpF8uMuAJOM2pxb1Q',
'qq' => '',
'offset' => 0,
'limit' => 20,
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/edu-star/orders')->getAsync([
'query' => [
'appid' => 'wx998877665544wx',
'wechat_openid' => 'oUpF8uMuAJOM2pxb1Q',
'qq' => '',
'offset' => 0,
'limit' => 20,
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/edu-star/orders']->getAsync([
'query' => [
'appid' => 'wx998877665544wx',
'wechat_openid' => 'oUpF8uMuAJOM2pxb1Q',
'qq' => '',
'offset' => 0,
'limit' => 20,
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->eduStar->orders->get([
'query' => [
'appid' => 'wx998877665544wx',
'wechat_openid' => 'oUpF8uMuAJOM2pxb1Q',
'qq' => '',
'offset' => 0,
'limit' => 20,
],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/edu-star/orders')->get([
'query' => [
'appid' => 'wx998877665544wx',
'wechat_openid' => 'oUpF8uMuAJOM2pxb1Q',
'qq' => '',
'offset' => 0,
'limit' => 20,
],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/edu-star/orders']->get([
'query' => [
'appid' => 'wx998877665544wx',
'wechat_openid' => 'oUpF8uMuAJOM2pxb1Q',
'qq' => '',
'offset' => 0,
'limit' => 20,
],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典 | 类型 | 描述 |
---|---|---|
data | object[] | 结果集 |
appid | string | appid |
wechat_openid | string | 用户在appid下的唯一标识 |
string | 用户QQ账号 | |
right_id | string | 权益ID |
create_time | string | 权益核销时间 |
order_state | string | 订单状态 |
order_id | string | 订单号 |
total_count | integer | 总数量 |
offset | integer | 分页页码 |
limit | integer | 分页大小 |
参阅 官方流程图