Completed
Pull Request — master (#19)
by
unknown
01:41
created
Instapago/Api.php 2 patches
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -83,9 +83,9 @@  discard block
 block discarded – undo
83 83
   /**
84 84
    * Crear un pago.
85 85
    *
86
-   * @param string $paymentType tipo de pago ('reserve' o 'direct')
87 86
    * @param \ArrayObject<string, string> $fields Los campos necesarios 
88 87
    * para procesar el pago.
88
+   * @param string $type
89 89
    * @return \ArrayObject<string, string> Respuesta de Instapago
90 90
    * @throws Exceptions\InstapagoException
91 91
    */
@@ -191,9 +191,9 @@  discard block
 block discarded – undo
191 191
    * Realiza Transaccion
192 192
    * Efectúa y retornar una respuesta a un metodo de pago.
193 193
    *
194
-   * @param $url endpoint a consultar
194
+   * @param string $url endpoint a consultar
195 195
    * @param $fields datos para la consulta
196
-   * @param $method verbo http de la consulta
196
+   * @param string $method verbo http de la consulta
197 197
    *
198 198
    * @return $obj array resultados de la transaccion
199 199
    */
Please login to merge, or discard this patch.
Braces   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -237,24 +237,24 @@  discard block
 block discarded – undo
237 237
       throw new Exceptions\InvalidInputException(
238 238
         'Error al validar los datos enviados.'
239 239
       );
240
-    }else if ($code == 401) {
240
+    } else if ($code == 401) {
241 241
       throw new Exceptions\AuthException(
242 242
         'Error de autenticación, ha ocurrido un error'
243 243
         . ' con las llaves utilizadas.');
244
-    }else if ($code == 403) {
244
+    } else if ($code == 403) {
245 245
       throw new Exceptions\BankRejectException(
246 246
         'Pago Rechazado por el banco.'
247 247
       );
248
-    }else if ($code == 500) {
248
+    } else if ($code == 500) {
249 249
       throw new Exceptions\InstapagoException(
250 250
         'Ha Ocurrido un error interno dentro del servidor.'
251 251
       );
252
-    }else if ($code == 503) {
252
+    } else if ($code == 503) {
253 253
       throw new Exceptions\InstapagoException(
254 254
         'Ha Ocurrido un error al procesar los parámetros de entrada.'
255 255
         . ' Revise los datos enviados y vuelva a intentarlo.'
256 256
       );
257
-    }else if ($code == 201) {
257
+    } else if ($code == 201) {
258 258
       return [
259 259
         'code'         => $code,
260 260
         'msg_banco'    => $obj->message,
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
         'id_pago'      => $obj->id,
263 263
         'reference'    => $obj->reference,
264 264
       ];
265
-    }else {
265
+    } else {
266 266
       throw new \Exception('Not implemented yet');
267 267
     }
268 268
   }
Please login to merge, or discard this patch.