Skip to content

Commit

Permalink
issue #9 (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
Xemii authored and jhaoda committed Sep 28, 2017
1 parent 1bb2a1e commit 19ce0cd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Payment.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public function getPaymentUrl()
if ($this->customParams) {
// sort params alphabetically
ksort($this->customParams);
$signature .= ':' . http_build_query($this->customParams, null, ':');
$signature .= ':' . implode(array_map(function($key, $value){ return $key . '=' .$value; }, array_keys($this->customParams), $this->customParams), ':');
}

$this->data['SignatureValue'] = md5($signature);
Expand Down Expand Up @@ -212,7 +212,7 @@ private function getCustomParamsString(array $source)
}

ksort($params);
$params = http_build_query($params, null, ':');
$params = implode(array_map(function($key, $value){ return $key . '=' .$value; }, array_keys($params), $params), ':');

return $params ? ':' . $params : '';
}
Expand Down

0 comments on commit 19ce0cd

Please sign in to comment.