Total Complexity | 3 |
Total Lines | 48 |
Duplicated Lines | 0 % |
Coverage | 66.67% |
Changes | 0 |
1 | <?php |
||
12 | abstract class AbstractWechat implements PaymentInterface |
||
13 | { |
||
14 | use SecurityTrait; |
||
15 | use RequestTrait; |
||
16 | |||
17 | /** |
||
18 | * @var \Illuminate\Config\Repository |
||
19 | */ |
||
20 | protected $config; |
||
21 | |||
22 | /** |
||
23 | * AbstractWechat constructor. |
||
24 | * |
||
25 | * @param \Illuminate\Config\Repository $config |
||
26 | */ |
||
27 | 3 | public function __construct(Repository $config) |
|
30 | 3 | } |
|
31 | |||
32 | /** |
||
33 | * @return mixed |
||
34 | */ |
||
35 | public function getClientIp() |
||
38 | } |
||
39 | |||
40 | /** |
||
41 | * Pregenerating order. |
||
42 | * |
||
43 | * @param string $gateway |
||
44 | * @param array $payload |
||
45 | * |
||
46 | * @return \Illuminate\Support\Collection |
||
47 | * |
||
48 | * @throws \Nilnice\Payment\Exception\GatewayException |
||
49 | * @throws \InvalidArgumentException |
||
50 | * @throws \Nilnice\Payment\Exception\InvalidKeyException |
||
51 | * @throws \Nilnice\Payment\Exception\InvalidSignException |
||
52 | * @throws \RuntimeException |
||
53 | */ |
||
54 | 3 | protected function prepare(string $gateway, array $payload) : Collection |
|
62 |