1 | <?php |
||
19 | class YouzanPay |
||
20 | { |
||
21 | /** |
||
22 | * @var Client |
||
23 | */ |
||
24 | protected $httpClient; |
||
25 | |||
26 | /** |
||
27 | * @var ApiContext |
||
28 | */ |
||
29 | protected $apiContext; |
||
30 | |||
31 | public function __construct(ApiContext $apiContext, $options = []) |
||
38 | |||
39 | /** |
||
40 | * 发起交易. |
||
41 | * |
||
42 | * @param array $data |
||
43 | * |
||
44 | * @return QRCode |
||
45 | */ |
||
46 | public function charge(array $data) |
||
53 | |||
54 | /** |
||
55 | * 检查支付结果. |
||
56 | * |
||
57 | * @param QRCode|int $qrCodeId |
||
58 | * |
||
59 | * @return bool |
||
60 | */ |
||
61 | public function checkQRStatus($qrCodeId) |
||
65 | |||
66 | /** |
||
67 | * 获取trade. |
||
68 | * |
||
69 | * @param int $id |
||
70 | * |
||
71 | * @return Api\Trade |
||
72 | */ |
||
73 | public function getTrade($id) |
||
77 | |||
78 | /** |
||
79 | * 验证推送 |
||
80 | * |
||
81 | * @param SymfonyRequest|PSR7Request|array|null $request |
||
82 | * |
||
83 | * @throws \InvalidArgumentException |
||
84 | * |
||
85 | * @return array |
||
86 | */ |
||
87 | public function verifyWebhook($request = null) |
||
104 | |||
105 | protected function verifySign($data) |
||
115 | |||
116 | /** |
||
117 | * 设置访问 token. |
||
118 | * |
||
119 | * @param string|Token $token |
||
120 | */ |
||
121 | public function setAccessToken($token) |
||
128 | |||
129 | /** |
||
130 | * 获取access token. |
||
131 | * |
||
132 | * @return Token |
||
133 | */ |
||
134 | public function getAccessToken() |
||
138 | |||
139 | protected function applyOptions($options) |
||
149 | } |
This check looks at variables that are passed out again to other methods.
If the outgoing method call has stricter type requirements than the method itself, an issue is raised.
An additional type check may prevent trouble.