Skip to content

Commit

Permalink
Merge pull request #5 from calibr/get-custom-params
Browse files Browse the repository at this point in the history
get custom param value from payment
  • Loading branch information
jhaoda committed Apr 10, 2015
2 parents f1539de + dc0409c commit d18d2b6
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/Payment.php
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,19 @@ private function getCustomParamsString(array $source)
return $params ? ':' . $params : '';
}

/**
* @param string $name - custom param name, without shp_
*
* @return mixed
*/
public function getCustomParam($name) {
$key = 'shp_' . $name;
if(!isset($this->data[$key])) {
return null;
}
return $this->data[$key];
}

/**
* @return int
*/
Expand Down

0 comments on commit d18d2b6

Please sign in to comment.