Skip to content

Commit

Permalink
Merge pull request #12 from CommerceRedsys/fix_get_parameters
Browse files Browse the repository at this point in the history
Fix getParameters method.
  • Loading branch information
facine authored Mar 26, 2018
2 parents 5593ddc + c0daae6 commit da205f2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Sermepa.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* Class implementation.
*/
class Sermepa implements SermepaInterface {

/**
* Constant indicating error code for an undefined parameter.
*/
Expand Down Expand Up @@ -407,7 +408,9 @@ private function getParameters() {
'Ds_Merchant_UrlOK' => $this->DsMerchantUrlOK,
);

return array_filter($parameters);
return array_filter($parameters, function($parameter) {
return ($parameter !== NULL && $parameter !== FALSE && $parameter !== '');
});
}

/**
Expand Down

0 comments on commit da205f2

Please sign in to comment.