Skip to content

Commit

Permalink
Some code tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
jhaoda committed Apr 10, 2015
1 parent d18d2b6 commit b702e54
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions src/Payment.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/**
Expand Down

0 comments on commit b702e54

Please sign in to comment.