diff --git a/src/Sermepa/Tpv/Tpv.php b/src/Sermepa/Tpv/Tpv.php index a464ea2..11d7a91 100644 --- a/src/Sermepa/Tpv/Tpv.php +++ b/src/Sermepa/Tpv/Tpv.php @@ -416,7 +416,7 @@ public function setMerchantSignature($signature) } /** - * Set enviroment + * Set environment * * @param string $environment test or live * @@ -473,11 +473,21 @@ public function setLanguage($languageCode = '001') } /** - * Return enviroment - * - * @return string Url of enviroment + * Return environment + * @deprecated Use `getEnvironment` + * @return string Url of environment */ public function getEnviroment() + { + return $this->getEnvironment(); + } + + /** + * Return environment + * + * @return string Url of environment + */ + public function getEnvironment() { return $this->_setEnvironment; } @@ -563,7 +573,7 @@ public function setTradeName($tradename = '') * Payment type * * @param string $method [T o C = Sólo Tarjeta (mostrará sólo el formulario para datos de tarjeta) - * R = Pago por Transferencia, D = Domiciliacion] + * R = Pago por Transferencia, D = Domiciliación] * * @return $this * @throws Exception @@ -628,13 +638,13 @@ public function setExpiryDate($expirydate='') public function setParameters($parameters=[]) { if(!is_array($parameters)) { - throw new TpvException('Paramaters is not an array'); + throw new TpvException('Parameters is not an array'); } $keys = array_keys($parameters); if(array_keys($keys) === $keys ) { - throw new TpvException('Paramaters is not an array associative'); + throw new TpvException('Parameters is not an array associative'); } $parameters = array_change_key_case($parameters, CASE_UPPER); diff --git a/tests/TpvTest.php b/tests/TpvTest.php index 37de92a..b20c214 100644 --- a/tests/TpvTest.php +++ b/tests/TpvTest.php @@ -282,7 +282,7 @@ public function throw_environment_is_not_test_or_live() } - public function SearchinFormProvider() + public function SearchingFormProvider() { return [ ['Ds_MerchantParameters'], @@ -295,7 +295,7 @@ public function SearchinFormProvider() /** * @test - * @dataProvider SearchinFormProvider + * @dataProvider SearchingFormProvider */ public function check_if_form_create_inputs_with_parameters($search) { @@ -508,8 +508,8 @@ public function invalidParameters() * @test * @dataProvider invalidParameters * @expectedException \Sermepa\Tpv\TpvException - * @expectedExceptionMessage Paramaters is not an array - * @expectedExceptionMessage Paramaters is not an array associative + * @expectedExceptionMessage Parameters is not an array + * @expectedExceptionMessage Parameters is not an array associative */ public function throw_parameters_is_not_an_array($parameters) @@ -535,4 +535,4 @@ public function set_new_parameters() } -} \ No newline at end of file +}