Skip to content

Commit

Permalink
增加企微[接口调用许可-订单管理-取消订单]接口 (#2588)
Browse files Browse the repository at this point in the history
Co-authored-by: lujunyi <lujunyi@shopex.cn>
  • Loading branch information
ljyljy0211 and lujunyi committed Sep 5, 2022
1 parent ea5bca7 commit 245d1e8
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/OpenWork/License/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -172,4 +172,27 @@ public function getAccountList(string $orderId, ?string $cursor = null, int $lim
'cursor' => $cursor
]);
}

/**
* 取消订单
*
* 取消接口许可购买和续费订单,只可取消未支付且未失效的订单。
*
* @param string $corpId 企业id,只支持加密的corpid
* @param string $orderId 订单号
*
* @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string
*
* @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException
* @throws \GuzzleHttp\Exception\GuzzleException
* @noinspection SpellCheckingInspection
* @noinspection PhpFullyQualifiedNameUsageInspection
*/
public function cancel(string $corpId, string $orderId)
{
return $this->httpPostJson('cgi-bin/license/cancel_order', [
'corpid' => $corpId,
'order_id' => $orderId,
]);
}
}

0 comments on commit 245d1e8

Please sign in to comment.