diff --git a/src/Payment.php b/src/Payment.php index a0efed5..9d8ba37 100644 --- a/src/Payment.php +++ b/src/Payment.php @@ -221,16 +221,21 @@ private function getCustomParamsString(array $source) } /** - * @param string $name - custom param name, without shp_ - * + * Get custom parameter from payment data. + * + * @param string $name parameter name without "shp_" + * * @return mixed */ - public function getCustomParam($name) { + public function getCustomParam($name) + { $key = 'shp_' . $name; - if(!isset($this->data[$key])) { - return null; + + if (isset($this->data[$key])) { + return $this->data[$key]; } - return $this->data[$key]; + + return null; } /**