@@ -11,11 +11,11 @@ discard block |
||
11 | 11 | |
12 | 12 | public function __construct($token, $status) { |
13 | 13 | |
14 | - if($status == 'producao'){ |
|
14 | + if ($status == 'producao') { |
|
15 | 15 | $this->api_status = false; |
16 | - }elseif($status == 'homologacao'){ |
|
16 | + }elseif ($status == 'homologacao') { |
|
17 | 17 | $this->api_status = 1; |
18 | - }else{ |
|
18 | + } else { |
|
19 | 19 | die('Tipo de homologação invalida'); |
20 | 20 | } |
21 | 21 | $this->api_key = $token; |
@@ -26,21 +26,21 @@ discard block |
||
26 | 26 | } |
27 | 27 | |
28 | 28 | |
29 | - public function get($url, $option = false, $custom = false ) |
|
29 | + public function get($url, $option = false, $custom = false) |
|
30 | 30 | { |
31 | 31 | |
32 | 32 | $ch = curl_init(); |
33 | - curl_setopt($ch, CURLOPT_URL, $this->base_url .'.asaas.com/api/v3'. $url.$option); |
|
33 | + curl_setopt($ch, CURLOPT_URL, $this->base_url . '.asaas.com/api/v3' . $url . $option); |
|
34 | 34 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); |
35 | 35 | curl_setopt($ch, CURLOPT_HEADER, FALSE); |
36 | 36 | |
37 | - if(!empty($custom)){ |
|
37 | + if (!empty($custom)) { |
|
38 | 38 | curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $custom); |
39 | 39 | } |
40 | 40 | |
41 | 41 | curl_setopt($ch, CURLOPT_HTTPHEADER, array( |
42 | 42 | "Content-Type: application/json", |
43 | - "access_token: ".$this->api_key |
|
43 | + "access_token: " . $this->api_key |
|
44 | 44 | )); |
45 | 45 | |
46 | 46 | $response = curl_exec($ch); |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | $params = json_encode($params); |
58 | 58 | $ch = curl_init(); |
59 | 59 | |
60 | - curl_setopt($ch, CURLOPT_URL, $this->base_url .'.asaas.com/api/v3'. $url); |
|
60 | + curl_setopt($ch, CURLOPT_URL, $this->base_url . '.asaas.com/api/v3' . $url); |
|
61 | 61 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); |
62 | 62 | curl_setopt($ch, CURLOPT_HEADER, FALSE); |
63 | 63 | |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | |
68 | 68 | curl_setopt($ch, CURLOPT_HTTPHEADER, array( |
69 | 69 | "Content-Type: application/json", |
70 | - "access_token: ".$this->api_key |
|
70 | + "access_token: " . $this->api_key |
|
71 | 71 | )); |
72 | 72 | |
73 | 73 | $response = curl_exec($ch); |