1 | <?php |
||
32 | class Payment |
||
33 | { |
||
34 | /** |
||
35 | * Scheme base path. |
||
36 | */ |
||
37 | const SCHEME_PATH = 'weixin://wxpay/bizpayurl'; |
||
38 | |||
39 | /** |
||
40 | * @var API |
||
41 | */ |
||
42 | protected $api; |
||
43 | |||
44 | /** |
||
45 | * Merchant instance. |
||
46 | * |
||
47 | * @var \EasyWeChat\Payment\Merchant |
||
48 | */ |
||
49 | protected $merchant; |
||
50 | |||
51 | /** |
||
52 | * Constructor. |
||
53 | * |
||
54 | * @param Merchant $merchant |
||
55 | */ |
||
56 | 8 | public function __construct(Merchant $merchant) |
|
60 | |||
61 | /** |
||
62 | * Build payment scheme for product. |
||
63 | * |
||
64 | * @param string $productId |
||
65 | * |
||
66 | * @return string |
||
67 | */ |
||
68 | 1 | public function scheme($productId) |
|
82 | |||
83 | /** |
||
84 | * Handle payment notify. |
||
85 | * |
||
86 | * @param callable $callback |
||
87 | * |
||
88 | * @return Response |
||
89 | */ |
||
90 | 2 | public function handleNotify(callable $callback) |
|
117 | |||
118 | /** |
||
119 | * [WeixinJSBridge] Generate js config for payment. |
||
120 | * |
||
121 | * <pre> |
||
122 | * WeixinJSBridge.invoke( |
||
123 | * 'getBrandWCPayRequest', |
||
124 | * ... |
||
125 | * ); |
||
126 | 1 | * </pre> |
|
127 | * |
||
128 | * @param string $prepayId |
||
129 | 1 | * @param bool $json |
|
130 | 1 | * |
|
131 | 1 | * @return string|array |
|
132 | 1 | */ |
|
133 | 1 | public function configForPayment($prepayId, $json = true) |
|
147 | |||
148 | /** |
||
149 | * [JSSDK] Generate js config for payment. |
||
150 | * |
||
151 | * <pre> |
||
152 | 1 | * wx.chooseWXPay({...}); |
|
153 | * </pre> |
||
154 | * |
||
155 | 1 | * @param string $prepayId |
|
156 | 1 | * @param bool $json |
|
|
|||
157 | 1 | * |
|
158 | 1 | * @return array|string |
|
159 | 1 | */ |
|
160 | 1 | public function configForJSSDKPayment($prepayId) |
|
169 | |||
170 | /** |
||
171 | * Generate app payment parameters. |
||
172 | * |
||
173 | * @param string $prepayId |
||
174 | * |
||
175 | * @return array |
||
176 | 2 | */ |
|
177 | public function configForAppPayment($prepayId) |
||
192 | 1 | ||
193 | 1 | /** |
|
194 | 1 | * Generate js config for share user address. |
|
195 | 1 | * |
|
196 | 1 | * @param string|\Overtrue\Socialite\AccessTokenInterface $accessToken |
|
197 | * @param bool $json |
||
198 | 2 | * |
|
199 | * @return string|array |
||
200 | 1 | */ |
|
201 | public function configForShareAddress($accessToken, $json = true) |
||
229 | |||
230 | 1 | /** |
|
231 | * Merchant setter. |
||
232 | 1 | * |
|
233 | * @param Merchant $merchant |
||
234 | */ |
||
235 | public function setMerchant(Merchant $merchant) |
||
239 | |||
240 | 1 | /** |
|
241 | * Merchant getter. |
||
242 | 1 | * |
|
243 | 1 | * @return Merchant |
|
244 | */ |
||
245 | public function getMerchant() |
||
249 | |||
250 | 1 | /** |
|
251 | * Return Notify instance. |
||
252 | 1 | * |
|
253 | * @return \EasyWeChat\Payment\Notify |
||
254 | */ |
||
255 | public function getNotify() |
||
259 | |||
260 | /** |
||
261 | * API setter. |
||
262 | * |
||
263 | * @param API $api |
||
264 | */ |
||
265 | public function setAPI(API $api) |
||
269 | |||
270 | /** |
||
271 | * Return API instance. |
||
272 | * |
||
273 | * @return API |
||
274 | */ |
||
275 | public function getAPI() |
||
279 | |||
280 | /** |
||
281 | * Magic call. |
||
282 | * |
||
283 | * @param string $method |
||
284 | * @param array $args |
||
285 | * |
||
286 | * @return mixed |
||
287 | * |
||
288 | * @codeCoverageIgnore |
||
289 | */ |
||
290 | public function __call($method, $args) |
||
296 | } |
||
297 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italy
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.