@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | */ |
87 | 87 | private function setRequestOptions() |
88 | 88 | { |
89 | - $authBearer = 'Bearer '. $this->secretKey; |
|
89 | + $authBearer = 'Bearer '.$this->secretKey; |
|
90 | 90 | |
91 | 91 | $this->client = new Client(['base_uri' => $this->baseUrl, |
92 | 92 | 'headers' => [ |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | "email" => request()->email |
121 | 121 | ]; |
122 | 122 | |
123 | - $this->response = $this->client->post($this->baseUrl . $relativeUrl, [ |
|
123 | + $this->response = $this->client->post($this->baseUrl.$relativeUrl, [ |
|
124 | 124 | 'body' => json_encode($data) |
125 | 125 | ]); |
126 | 126 | |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | |
130 | 130 | private function setGetResponse($relativeUrl, $body = array()) |
131 | 131 | { |
132 | - $this->response = $this->client->get($this->baseUrl . $relativeUrl, $body); |
|
132 | + $this->response = $this->client->get($this->baseUrl.$relativeUrl, $body); |
|
133 | 133 | |
134 | 134 | return $this; |
135 | 135 | } |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | |
158 | 158 | $relativeUrl = "/transaction/verify/{$transactionRef}"; |
159 | 159 | |
160 | - $this->response = $this->client->get($this->baseUrl . $relativeUrl, []); |
|
160 | + $this->response = $this->client->get($this->baseUrl.$relativeUrl, []); |
|
161 | 161 | } |
162 | 162 | |
163 | 163 | /** |
@@ -284,7 +284,7 @@ discard block |
||
284 | 284 | * Create a plan |
285 | 285 | * @return array |
286 | 286 | */ |
287 | - public function createPlan(){ |
|
287 | + public function createPlan() { |
|
288 | 288 | |
289 | 289 | $data = [ |
290 | 290 | |
@@ -308,11 +308,11 @@ discard block |
||
308 | 308 | * @param $plan_code |
309 | 309 | * @return array |
310 | 310 | */ |
311 | - public function fetchPlan($plan_code){ |
|
311 | + public function fetchPlan($plan_code) { |
|
312 | 312 | |
313 | 313 | $this->setRequestOptions(); |
314 | 314 | |
315 | - return $this->setGetResponse('/plan/' . $plan_code, [])->getResponse(); |
|
315 | + return $this->setGetResponse('/plan/'.$plan_code, [])->getResponse(); |
|
316 | 316 | |
317 | 317 | } |
318 | 318 | |
@@ -321,7 +321,7 @@ discard block |
||
321 | 321 | * @param $plan_code |
322 | 322 | * @return array |
323 | 323 | */ |
324 | - public function updatePlan($plan_code){ |
|
324 | + public function updatePlan($plan_code) { |
|
325 | 325 | |
326 | 326 | $data = [ |
327 | 327 | |
@@ -336,7 +336,7 @@ discard block |
||
336 | 336 | |
337 | 337 | $this->setRequestOptions(); |
338 | 338 | |
339 | - return $this->setGetResponse('/plan/' . $plan_code, $data)->getResponse(); |
|
339 | + return $this->setGetResponse('/plan/'.$plan_code, $data)->getResponse(); |
|
340 | 340 | |
341 | 341 | } |
342 | 342 | |
@@ -344,7 +344,7 @@ discard block |
||
344 | 344 | * Create a customer |
345 | 345 | * @return array |
346 | 346 | */ |
347 | - public function createCustomer(){ |
|
347 | + public function createCustomer() { |
|
348 | 348 | |
349 | 349 | $data = [ |
350 | 350 | |
@@ -367,11 +367,11 @@ discard block |
||
367 | 367 | * @param $customer_id |
368 | 368 | * @return array |
369 | 369 | */ |
370 | - public function fetchCustomer($customer_id){ |
|
370 | + public function fetchCustomer($customer_id) { |
|
371 | 371 | |
372 | 372 | $this->setRequestOptions(); |
373 | 373 | |
374 | - return $this->setGetResponse('/customer/'. $customer_id, [])->getResponse(); |
|
374 | + return $this->setGetResponse('/customer/'.$customer_id, [])->getResponse(); |
|
375 | 375 | |
376 | 376 | } |
377 | 377 | |
@@ -380,7 +380,7 @@ discard block |
||
380 | 380 | * @param $customer_id |
381 | 381 | * @return array |
382 | 382 | */ |
383 | - public function updateCustomer($customer_id){ |
|
383 | + public function updateCustomer($customer_id) { |
|
384 | 384 | |
385 | 385 | $data = [ |
386 | 386 | |
@@ -394,7 +394,7 @@ discard block |
||
394 | 394 | |
395 | 395 | $this->setRequestOptions(); |
396 | 396 | |
397 | - return $this->setGetResponse('/customer/'. $customer_id, $data)->getResponse(); |
|
397 | + return $this->setGetResponse('/customer/'.$customer_id, $data)->getResponse(); |
|
398 | 398 | |
399 | 399 | } |
400 | 400 | |
@@ -402,7 +402,7 @@ discard block |
||
402 | 402 | * Export tranactions in .CSV |
403 | 403 | * @return array |
404 | 404 | */ |
405 | - public function exportTransactions(){ |
|
405 | + public function exportTransactions() { |
|
406 | 406 | |
407 | 407 | $data = [ |
408 | 408 | "from" => request()->from, |
@@ -420,7 +420,7 @@ discard block |
||
420 | 420 | * Create a subscription to a plan from a customer. |
421 | 421 | * @return array |
422 | 422 | */ |
423 | - public function createSubscription(){ |
|
423 | + public function createSubscription() { |
|
424 | 424 | |
425 | 425 | $data = [ |
426 | 426 | "customer" => request()->customer, //Customer email or code |