正在显示
1 个修改的文件
包含
13 行增加
和
19 行删除
| @@ -10,32 +10,29 @@ class Coupon extends ServiceManager | @@ -10,32 +10,29 @@ class Coupon extends ServiceManager | ||
| 10 | /** | 10 | /** |
| 11 | * 验券准备 | 11 | * 验券准备 |
| 12 | * | 12 | * |
| 13 | - * @param string $encryptedData | ||
| 14 | - * @param string $code | 13 | + * @param string $encryptedData |
| 14 | + * @param string $code | ||
| 15 | * | 15 | * |
| 16 | * @return mixed | 16 | * @return mixed |
| 17 | */ | 17 | */ |
| 18 | public function prepare(string $encryptedData = '', string $code = '') | 18 | public function prepare(string $encryptedData = '', string $code = '') |
| 19 | { | 19 | { |
| 20 | - return $this->app['client'] | ||
| 21 | - ->asForm() | ||
| 22 | - ->withSession() | 20 | + return $this->app['client']->withSession() |
| 23 | ->signVia(new LifeSigner()) | 21 | ->signVia(new LifeSigner()) |
| 24 | - ->post('/goodlife/v1/fulfilment/certificate/prepare/', | 22 | + ->get('/goodlife/v1/fulfilment/certificate/prepare/', |
| 25 | ['encrypted_data' => $encryptedData, 'code' => $code]); | 23 | ['encrypted_data' => $encryptedData, 'code' => $code]); |
| 26 | } | 24 | } |
| 27 | 25 | ||
| 28 | /** | 26 | /** |
| 29 | * 验券 | 27 | * 验券 |
| 30 | * | 28 | * |
| 31 | - * @param array $body | 29 | + * @param array $body |
| 32 | * | 30 | * |
| 33 | * @return mixed | 31 | * @return mixed |
| 34 | */ | 32 | */ |
| 35 | public function verify(array $body = []) | 33 | public function verify(array $body = []) |
| 36 | { | 34 | { |
| 37 | - return $this->app['client'] | ||
| 38 | - ->asForm() | 35 | + return $this->app['client']->asJson() |
| 39 | ->withSession() | 36 | ->withSession() |
| 40 | ->signVia(new LifeSigner()) | 37 | ->signVia(new LifeSigner()) |
| 41 | ->post('/goodlife/v1/fulfilment/certificate/verify/', $body); | 38 | ->post('/goodlife/v1/fulfilment/certificate/verify/', $body); |
| @@ -46,14 +43,13 @@ class Coupon extends ServiceManager | @@ -46,14 +43,13 @@ class Coupon extends ServiceManager | ||
| 46 | * | 43 | * |
| 47 | * @link https://developer.open-douyin.com/docs/resource/zh-CN/dop/develop/openapi/life-service-open-ability/life.capacity/life.capacity.fulfilment/certificate.verify | 44 | * @link https://developer.open-douyin.com/docs/resource/zh-CN/dop/develop/openapi/life-service-open-ability/life.capacity/life.capacity.fulfilment/certificate.verify |
| 48 | * | 45 | * |
| 49 | - * @param array $body | 46 | + * @param array $body |
| 50 | * | 47 | * |
| 51 | * @return mixed | 48 | * @return mixed |
| 52 | */ | 49 | */ |
| 53 | public function cancel(array $body = []) | 50 | public function cancel(array $body = []) |
| 54 | { | 51 | { |
| 55 | - return $this->app['client'] | ||
| 56 | - ->asForm() | 52 | + return $this->app['client']->asForm() |
| 57 | ->withSession() | 53 | ->withSession() |
| 58 | ->signVia(new LifeSigner()) | 54 | ->signVia(new LifeSigner()) |
| 59 | ->post('/goodlife/v1/fulfilment/certificate/cancel/', $body); | 55 | ->post('/goodlife/v1/fulfilment/certificate/cancel/', $body); |
| @@ -62,14 +58,13 @@ class Coupon extends ServiceManager | @@ -62,14 +58,13 @@ class Coupon extends ServiceManager | ||
| 62 | /** | 58 | /** |
| 63 | * 券状态查询 | 59 | * 券状态查询 |
| 64 | * | 60 | * |
| 65 | - * @param string $encryptedCode | 61 | + * @param string $encryptedCode |
| 66 | * | 62 | * |
| 67 | * @return mixed | 63 | * @return mixed |
| 68 | */ | 64 | */ |
| 69 | public function get(string $encryptedCode) | 65 | public function get(string $encryptedCode) |
| 70 | { | 66 | { |
| 71 | - return $this->app['client'] | ||
| 72 | - ->asForm() | 67 | + return $this->app['client']->asForm() |
| 73 | ->withSession() | 68 | ->withSession() |
| 74 | ->signVia(new LifeSigner()) | 69 | ->signVia(new LifeSigner()) |
| 75 | ->get('/goodlife/v1/fulfilment/certificate/get/', ['encrypted_code' => $encryptedCode]); | 70 | ->get('/goodlife/v1/fulfilment/certificate/get/', ['encrypted_code' => $encryptedCode]); |
| @@ -78,15 +73,14 @@ class Coupon extends ServiceManager | @@ -78,15 +73,14 @@ class Coupon extends ServiceManager | ||
| 78 | /** | 73 | /** |
| 79 | * 券状态批量查询 | 74 | * 券状态批量查询 |
| 80 | * | 75 | * |
| 81 | - * @param string $encryptedCode | ||
| 82 | - * @param string $orderId | 76 | + * @param string $encryptedCode |
| 77 | + * @param string $orderId | ||
| 83 | * | 78 | * |
| 84 | * @return mixed | 79 | * @return mixed |
| 85 | */ | 80 | */ |
| 86 | public function query(string $encryptedCode = '', string $orderId = '') | 81 | public function query(string $encryptedCode = '', string $orderId = '') |
| 87 | { | 82 | { |
| 88 | - return $this->app['client'] | ||
| 89 | - ->asForm() | 83 | + return $this->app['client']->asForm() |
| 90 | ->withSession() | 84 | ->withSession() |
| 91 | ->signVia(new LifeSigner()) | 85 | ->signVia(new LifeSigner()) |
| 92 | ->get('/goodlife/v1/fulfilment/certificate/query/', | 86 | ->get('/goodlife/v1/fulfilment/certificate/query/', |
-
请 注册 或 登录 后发表评论