1 | <?php |
||
29 | class PaystackFactory |
||
30 | { |
||
31 | /** |
||
32 | * Laravel Cache Instance |
||
33 | * |
||
34 | * @var Factory |
||
35 | */ |
||
36 | private $cache; |
||
37 | |||
38 | /** |
||
39 | * PaystackFactory constructor. |
||
40 | * |
||
41 | * @param Factory|null $cache |
||
42 | */ |
||
43 | public function __construct(Factory $cache = null) |
||
47 | |||
48 | /** |
||
49 | * Creates A Paystack Client Object |
||
50 | * |
||
51 | * @param array $config |
||
52 | * @return Client |
||
53 | * @throws \ReflectionException |
||
54 | * @throws \Illuminate\Contracts\Container\BindingResolutionException |
||
55 | */ |
||
56 | public function make(array $config) |
||
76 | |||
77 | /** |
||
78 | * Check to see if Secret key doesn't exists |
||
79 | * |
||
80 | * @param array $config |
||
81 | * @return bool |
||
82 | */ |
||
83 | protected function secretKeyDoesNotExist(array $config) |
||
87 | |||
88 | /** |
||
89 | * Creates a Compatible Paystack Client Configuration from a configuration array |
||
90 | * |
||
91 | * @param array $config |
||
92 | * @return Config |
||
93 | */ |
||
94 | public function createCompatibleConfiguration(array $config) |
||
98 | |||
99 | /** |
||
100 | * Prepares and retrieves the Paystack client builder |
||
101 | * |
||
102 | * @param $config |
||
103 | * @return ClientBuilder |
||
104 | * @throws \ReflectionException |
||
105 | */ |
||
106 | protected function getBuilder($config) |
||
116 | } |
||
117 |