Total Complexity | 6 |
Total Lines | 91 |
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) |
|
41 | } |
||
42 | |||
43 | /** |
||
44 | * 查询支付后开票信息接口. |
||
45 | * |
||
46 | * @return mixed |
||
47 | */ |
||
48 | 1 | public function get() |
|
49 | { |
||
50 | 1 | return $this->setBizAttr('get_pay_mch'); |
|
51 | } |
||
52 | |||
53 | /** |
||
54 | * 设置授权页字段信息接口. |
||
55 | * |
||
56 | * @param array $userData |
||
57 | * @param array $bizData |
||
58 | * |
||
59 | * @return mixed |
||
60 | */ |
||
61 | 1 | public function setAuthField(array $userData, array $bizData) |
|
62 | { |
||
63 | $params = [ |
||
64 | 'auth_field' => [ |
||
65 | 1 | 'user_field' => $userData, |
|
66 | 1 | 'biz_field' => $bizData, |
|
67 | ], |
||
68 | ]; |
||
69 | |||
70 | 1 | return $this->setBizAttr('set_auth_field', $params); |
|
71 | } |
||
72 | |||
73 | /** |
||
74 | * 查询授权页字段信息接口. |
||
75 | * |
||
76 | * @return mixed |
||
77 | */ |
||
78 | 1 | public function getAuthField() |
|
81 | } |
||
82 | |||
83 | /** |
||
84 | * 查询开票信息. |
||
85 | * |
||
86 | * @param string $orderId |
||
87 | * @param string $appId |
||
88 | * |
||
89 | * @return mixed |
||
90 | */ |
||
91 | 1 | public function getAuthData(string $appId, string $orderId) |
|
99 | } |
||
100 | |||
101 | /** |
||
102 | * @param string $action |
||
103 | * @param array $params |
||
104 | * |
||
105 | * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string |
||
106 | * |
||
107 | * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException |
||
108 | */ |
||
109 | 4 | private function setBizAttr(string $action, array $params = []) |
|
114 |