|
...
|
...
|
@@ -10,32 +10,29 @@ class Coupon extends ServiceManager |
|
|
|
/**
|
|
|
|
* 验券准备
|
|
|
|
*
|
|
|
|
* @param string $encryptedData
|
|
|
|
* @param string $code
|
|
|
|
* @param string $encryptedData
|
|
|
|
* @param string $code
|
|
|
|
*
|
|
|
|
* @return mixed
|
|
|
|
*/
|
|
|
|
public function prepare(string $encryptedData = '', string $code = '')
|
|
|
|
{
|
|
|
|
return $this->app['client']
|
|
|
|
->asForm()
|
|
|
|
->withSession()
|
|
|
|
return $this->app['client']->withSession()
|
|
|
|
->signVia(new LifeSigner())
|
|
|
|
->post('/goodlife/v1/fulfilment/certificate/prepare/',
|
|
|
|
->get('/goodlife/v1/fulfilment/certificate/prepare/',
|
|
|
|
['encrypted_data' => $encryptedData, 'code' => $code]);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 验券
|
|
|
|
*
|
|
|
|
* @param array $body
|
|
|
|
* @param array $body
|
|
|
|
*
|
|
|
|
* @return mixed
|
|
|
|
*/
|
|
|
|
public function verify(array $body = [])
|
|
|
|
{
|
|
|
|
return $this->app['client']
|
|
|
|
->asForm()
|
|
|
|
return $this->app['client']->asJson()
|
|
|
|
->withSession()
|
|
|
|
->signVia(new LifeSigner())
|
|
|
|
->post('/goodlife/v1/fulfilment/certificate/verify/', $body);
|
|
...
|
...
|
@@ -46,14 +43,13 @@ class Coupon extends ServiceManager |
|
|
|
*
|
|
|
|
* @link https://developer.open-douyin.com/docs/resource/zh-CN/dop/develop/openapi/life-service-open-ability/life.capacity/life.capacity.fulfilment/certificate.verify
|
|
|
|
*
|
|
|
|
* @param array $body
|
|
|
|
* @param array $body
|
|
|
|
*
|
|
|
|
* @return mixed
|
|
|
|
*/
|
|
|
|
public function cancel(array $body = [])
|
|
|
|
{
|
|
|
|
return $this->app['client']
|
|
|
|
->asForm()
|
|
|
|
return $this->app['client']->asForm()
|
|
|
|
->withSession()
|
|
|
|
->signVia(new LifeSigner())
|
|
|
|
->post('/goodlife/v1/fulfilment/certificate/cancel/', $body);
|
|
...
|
...
|
@@ -62,14 +58,13 @@ class Coupon extends ServiceManager |
|
|
|
/**
|
|
|
|
* 券状态查询
|
|
|
|
*
|
|
|
|
* @param string $encryptedCode
|
|
|
|
* @param string $encryptedCode
|
|
|
|
*
|
|
|
|
* @return mixed
|
|
|
|
*/
|
|
|
|
public function get(string $encryptedCode)
|
|
|
|
{
|
|
|
|
return $this->app['client']
|
|
|
|
->asForm()
|
|
|
|
return $this->app['client']->asForm()
|
|
|
|
->withSession()
|
|
|
|
->signVia(new LifeSigner())
|
|
|
|
->get('/goodlife/v1/fulfilment/certificate/get/', ['encrypted_code' => $encryptedCode]);
|
|
...
|
...
|
@@ -78,15 +73,14 @@ class Coupon extends ServiceManager |
|
|
|
/**
|
|
|
|
* 券状态批量查询
|
|
|
|
*
|
|
|
|
* @param string $encryptedCode
|
|
|
|
* @param string $orderId
|
|
|
|
* @param string $encryptedCode
|
|
|
|
* @param string $orderId
|
|
|
|
*
|
|
|
|
* @return mixed
|
|
|
|
*/
|
|
|
|
public function query(string $encryptedCode = '', string $orderId = '')
|
|
|
|
{
|
|
|
|
return $this->app['client']
|
|
|
|
->asForm()
|
|
|
|
return $this->app['client']->asForm()
|
|
|
|
->withSession()
|
|
|
|
->signVia(new LifeSigner())
|
|
|
|
->get('/goodlife/v1/fulfilment/certificate/query/',
|
...
|
...
|
|