Total Complexity | 6 |
Total Lines | 88 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
21 | class InvoiceClient extends BaseClient |
||
22 | { |
||
23 | /** |
||
24 | * 设置支付后开票信息接口. |
||
25 | * |
||
26 | * @param string $mchid |
||
27 | * @param string $sPappid |
||
28 | * |
||
29 | * @return mixed |
||
30 | */ |
||
31 | 1 | public function set(string $mchid, string $sPappid) |
|
40 | } |
||
41 | |||
42 | /** |
||
43 | * 查询支付后开票信息接口. |
||
44 | * |
||
45 | * @return mixed |
||
46 | */ |
||
47 | 1 | public function get() |
|
48 | { |
||
49 | 1 | return $this->setBizattr('get_pay_mch'); |
|
50 | } |
||
51 | |||
52 | /** |
||
53 | * 设置授权页字段信息接口. |
||
54 | * |
||
55 | * @param array $userData |
||
56 | * @param array $bizData |
||
57 | * |
||
58 | * @return mixed |
||
59 | */ |
||
60 | 1 | public function setAuthField(array $userData, array $bizData) |
|
61 | { |
||
62 | $params = [ |
||
63 | 'auth_field' => [ |
||
64 | 1 | 'user_field' => $userData, |
|
65 | 1 | 'biz_field' => $bizData, |
|
66 | ], |
||
67 | ]; |
||
68 | 1 | return $this->setBizattr('set_auth_field', $params); |
|
69 | } |
||
70 | |||
71 | /** |
||
72 | * 查询授权页字段信息接口. |
||
73 | * |
||
74 | * @return mixed |
||
75 | */ |
||
76 | 1 | public function getAuthField() |
|
79 | } |
||
80 | |||
81 | /** |
||
82 | * 查询开票信息. |
||
83 | * |
||
84 | * @param string $orderId |
||
85 | * @param string $appId |
||
86 | * |
||
87 | * @return mixed |
||
88 | */ |
||
89 | 1 | public function getAuthData(string $appId, string $orderId) |
|
96 | } |
||
97 | |||
98 | /** |
||
99 | * @param string $action |
||
100 | * @param array $params |
||
101 | * |
||
102 | * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string |
||
103 | * |
||
104 | * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException |
||
105 | */ |
||
106 | 4 | private function setBizattr(string $action, array $params = []) |
|
109 | } |
||
110 | } |