Completed
Pull Request — 1.11.x (#1599)
by José
28:19
created
plugin/buycourses/src/culqi.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,8 +14,8 @@
 block discarded – undo
14 14
  */
15 15
 
16 16
 // Errors
17
-include_once(dirname(__FILE__). '/Culqi/Error/Errors.php');
18
-include_once(dirname(__FILE__). '/Culqi/AuthBearer.php');
17
+include_once(dirname(__FILE__).'/Culqi/Error/Errors.php');
18
+include_once(dirname(__FILE__).'/Culqi/AuthBearer.php');
19 19
 include_once dirname(__FILE__).'/Culqi/Client.php';
20 20
 include_once dirname(__FILE__).'/Culqi/Resource.php';
21 21
 
Please login to merge, or discard this patch.
plugin/buycourses/src/Culqi/Planes.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,9 +27,9 @@
 block discarded – undo
27 27
     public function delete($id)
28 28
     {
29 29
 
30
-       return $this->request("DELETE", Planes::URL_PLANES . $id . "/", $api_key = $this->culqi->api_key);
30
+        return $this->request("DELETE", Planes::URL_PLANES . $id . "/", $api_key = $this->culqi->api_key);
31 31
 
32
-   }
32
+    }
33 33
 
34 34
 
35 35
 
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,13 +21,13 @@
 block discarded – undo
21 21
     public function get($id)
22 22
     {
23 23
 
24
-        return $this->request("GET", Planes::URL_PLANES . $id . "/", $api_key = $this->culqi->api_key);
24
+        return $this->request("GET", Planes::URL_PLANES.$id."/", $api_key = $this->culqi->api_key);
25 25
     }
26 26
 
27 27
     public function delete($id)
28 28
     {
29 29
 
30
-       return $this->request("DELETE", Planes::URL_PLANES . $id . "/", $api_key = $this->culqi->api_key);
30
+       return $this->request("DELETE", Planes::URL_PLANES.$id."/", $api_key = $this->culqi->api_key);
31 31
 
32 32
    }
33 33
 
Please login to merge, or discard this patch.
plugin/buycourses/src/Culqi/AuthBearer.php 2 patches
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -4,17 +4,17 @@
 block discarded – undo
4 4
 
5 5
 class AuthBearer implements \Requests_Auth
6 6
 {
7
-	protected $password;
7
+    protected $password;
8 8
 
9
-	public function __construct($password) {
10
-		$this->password = $password;
11
-	}
9
+    public function __construct($password) {
10
+        $this->password = $password;
11
+    }
12 12
 
13
-	public function register(\Requests_Hooks &$hooks) {
14
-		$hooks->register('requests.before_request', array(&$this, 'before_request'));
15
-	}
13
+    public function register(\Requests_Hooks &$hooks) {
14
+        $hooks->register('requests.before_request', array(&$this, 'before_request'));
15
+    }
16 16
 
17
-	public function before_request(&$url, &$headers, &$data, &$type, &$options) {
18
-		$headers['Authorization: Bearer'] = $this->password;
19
-	}
17
+    public function before_request(&$url, &$headers, &$data, &$type, &$options) {
18
+        $headers['Authorization: Bearer'] = $this->password;
19
+    }
20 20
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
 		$this->password = $password;
11 11
 	}
12 12
 
13
-	public function register(\Requests_Hooks &$hooks) {
13
+	public function register(\Requests_Hooks & $hooks) {
14 14
 		$hooks->register('requests.before_request', array(&$this, 'before_request'));
15 15
 	}
16 16
 
Please login to merge, or discard this patch.
plugin/buycourses/src/Culqi/Devoluciones.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
 
18 18
     public function get($id)
19 19
     {
20
-        return $this->request("GET", Devoluciones::URL_REFUND . $id . "/", $api_key = $this->culqi->api_key);
20
+        return $this->request("GET", Devoluciones::URL_REFUND.$id."/", $api_key = $this->culqi->api_key);
21 21
     }
22 22
 
23 23
 
Please login to merge, or discard this patch.
plugin/buycourses/src/Culqi/Culqi.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
             self::$api_base = "https://pago.culqi.com/api/v1";
39 39
         }
40 40
         else {
41
-             self::$api_base = "https://integ-pago.culqi.com/api/v1";
41
+                self::$api_base = "https://integ-pago.culqi.com/api/v1";
42 42
         }
43 43
 
44 44
     }
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -33,11 +33,9 @@
 block discarded – undo
33 33
     {
34 34
         if ($entorno == 'INTEG') {
35 35
             self::$api_base = "https://integ-pago.culqi.com/api/v1";
36
-        }
37
-        elseif ($entorno == 'PRODUC') {
36
+        } elseif ($entorno == 'PRODUC') {
38 37
             self::$api_base = "https://pago.culqi.com/api/v1";
39
-        }
40
-        else {
38
+        } else {
41 39
              self::$api_base = "https://integ-pago.culqi.com/api/v1";
42 40
         }
43 41
 
Please login to merge, or discard this patch.
plugin/buycourses/src/Culqi/Cargos.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
 
18 18
     public function get($id)
19 19
     {
20
-        return $this->request("GET", Cargos::URL_CARGOS . $id . "/", $api_key = $this->culqi->api_key);
20
+        return $this->request("GET", Cargos::URL_CARGOS.$id."/", $api_key = $this->culqi->api_key);
21 21
     }
22 22
 
23 23
 
Please login to merge, or discard this patch.
plugin/buycourses/src/paymentsetup.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
             Display::return_message(get_lang('ItemRemoved'), 'success')
29 29
         );
30 30
 
31
-        header('Location: ' . api_get_self());
31
+        header('Location: '.api_get_self());
32 32
         exit;
33 33
     }
34 34
 }
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
         Display::return_message(get_lang('Saved'), 'success')
47 47
     );
48 48
 
49
-    header('Location:' . api_get_self());
49
+    header('Location:'.api_get_self());
50 50
     exit;
51 51
 }
52 52
 
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
     }
79 79
 }
80 80
 
81
-$currencyForm->addTextarea('terms_and_conditions', [ get_lang('TermsAndConditions'), $plugin->get_lang('WriteHereTheTermsAndConditionsOfYourECommerce') ], '');
81
+$currencyForm->addTextarea('terms_and_conditions', [get_lang('TermsAndConditions'), $plugin->get_lang('WriteHereTheTermsAndConditionsOfYourECommerce')], '');
82 82
 $currencyForm->addButtonSave(get_lang('Save'));
83 83
 $currencyForm->setDefaults($plugin->getGlobalParameters());
84 84
 
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
         Display::return_message(get_lang('Saved'), 'success')
96 96
     );
97 97
 
98
-    header('Location:' . api_get_self());
98
+    header('Location:'.api_get_self());
99 99
     exit;
100 100
 }
101 101
 
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
         Display::return_message(get_lang('Saved'), 'success')
135 135
     );
136 136
 
137
-    header('Location:' . api_get_self());
137
+    header('Location:'.api_get_self());
138 138
     exit;
139 139
 }
140 140
 
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
         Display::return_message(get_lang('Saved'), 'success')
161 161
     );
162 162
 
163
-    header('Location:' . api_get_self());
163
+    header('Location:'.api_get_self());
164 164
     exit;
165 165
 }
166 166
 
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
         Display::return_message(get_lang('Saved'), 'success')
200 200
     );
201 201
 
202
-    header('Location:' . api_get_self());
202
+    header('Location:'.api_get_self());
203 203
     exit;
204 204
 }
205 205
 
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
 
222 222
 // breadcrumbs
223 223
 $interbreadcrumb[] = [
224
-    'url' => api_get_path(WEB_PLUGIN_PATH) . 'buycourses/index.php',
224
+    'url' => api_get_path(WEB_PLUGIN_PATH).'buycourses/index.php',
225 225
     'name' => $plugin->get_lang('plugin_title')
226 226
 ];
227 227
 
Please login to merge, or discard this patch.
plugin/buycourses/src/process_confirm.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -48,8 +48,8 @@  discard block
 block discarded – undo
48 48
             $sale['price'],
49 49
             $currency['iso_code'],
50 50
             'paypal',
51
-            api_get_path(WEB_PLUGIN_PATH) . 'buycourses/src/success.php',
52
-            api_get_path(WEB_PLUGIN_PATH) . 'buycourses/src/error.php',
51
+            api_get_path(WEB_PLUGIN_PATH).'buycourses/src/success.php',
52
+            api_get_path(WEB_PLUGIN_PATH).'buycourses/src/error.php',
53 53
             $extra
54 54
         );
55 55
 
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
 
95 95
                 unset($_SESSION['bc_sale_id']);
96 96
 
97
-                header('Location: ' . api_get_path(WEB_PLUGIN_PATH) . 'buycourses/index.php');
97
+                header('Location: '.api_get_path(WEB_PLUGIN_PATH).'buycourses/index.php');
98 98
                 exit;
99 99
             }
100 100
 
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
             );
132 132
 
133 133
             unset($_SESSION['bc_sale_id']);
134
-            header('Location: ' . api_get_path(WEB_PLUGIN_PATH) . 'buycourses/src/course_catalog.php');
134
+            header('Location: '.api_get_path(WEB_PLUGIN_PATH).'buycourses/src/course_catalog.php');
135 135
             exit;
136 136
         }
137 137
 
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
                     )
204 204
                 );
205 205
 
206
-                header('Location: ' . api_get_path(WEB_PLUGIN_PATH) . 'buycourses/index.php');
206
+                header('Location: '.api_get_path(WEB_PLUGIN_PATH).'buycourses/index.php');
207 207
                 exit;
208 208
             }
209 209
         }
Please login to merge, or discard this patch.
plugin/buycourses/src/service_process_confirm.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -42,8 +42,8 @@  discard block
 block discarded – undo
42 42
         // purchase-specific fields are ignored. This little condition handle this fact.
43 43
         $itemPrice = $serviceSale['price'];
44 44
 
45
-        $returnUrl = api_get_path(WEB_PLUGIN_PATH) . 'buycourses/src/service_success.php';
46
-        $cancelUrl = api_get_path(WEB_PLUGIN_PATH) . 'buycourses/src/service_error.php';
45
+        $returnUrl = api_get_path(WEB_PLUGIN_PATH).'buycourses/src/service_success.php';
46
+        $cancelUrl = api_get_path(WEB_PLUGIN_PATH).'buycourses/src/service_error.php';
47 47
 
48 48
         // The extra params for handle the hard job, this var is VERY IMPORTANT !!
49 49
         $extra = '';
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 
76 76
             $plugin->cancelServiceSale(intval($serviceSale['id']));
77 77
 
78
-            header('Location: '. api_get_path(WEB_PLUGIN_PATH) . 'buycourses/src/service_catalog.php');
78
+            header('Location: '.api_get_path(WEB_PLUGIN_PATH).'buycourses/src/service_catalog.php');
79 79
             exit;
80 80
         }
81 81
 
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
                 Display::addFlash(
113 113
                     Display::return_message($plugin->get_lang('OrderCancelled'), 'error', false)
114 114
                 );
115
-                header('Location: '. api_get_path(WEB_PLUGIN_PATH) . 'buycourses/src/service_catalog.php');
115
+                header('Location: '.api_get_path(WEB_PLUGIN_PATH).'buycourses/src/service_catalog.php');
116 116
                 exit;
117 117
             }
118 118
 
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
             );
152 152
 
153 153
             unset($_SESSION['bc_service_sale_id']);
154
-            header('Location: ' . api_get_path(WEB_PLUGIN_PATH) . 'buycourses/src/service_catalog.php');
154
+            header('Location: '.api_get_path(WEB_PLUGIN_PATH).'buycourses/src/service_catalog.php');
155 155
             exit;
156 156
         }
157 157
 
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
                     )
202 202
                 );
203 203
 
204
-                header('Location: ' . api_get_path(WEB_PLUGIN_PATH) . 'buycourses/index.php');
204
+                header('Location: '.api_get_path(WEB_PLUGIN_PATH).'buycourses/index.php');
205 205
                 exit;
206 206
             }
207 207
         }
Please login to merge, or discard this patch.