Skip to content
This repository has been archived by the owner on Dec 2, 2024. It is now read-only.

Commit

Permalink
Update SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
regdos committed Aug 3, 2018
1 parent c74efb1 commit c40845e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/PayU/OpenPayU/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class OpenPayU_Configuration

const API_VERSION = '2.1';
const COMPOSER_JSON = "/composer.json";
const DEFAULT_SDK_VERSION = 'PHP SDK 2.2.9';
const DEFAULT_SDK_VERSION = 'PHP SDK 2.2.10';
const OAUTH_CONTEXT = 'pl/standard/user/oauth/authorize';

/**
Expand Down
6 changes: 2 additions & 4 deletions lib/PayU/OpenPayU/Util.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,12 @@ public static function parseSignature($data)
*/
public static function verifySignature($message, $signature, $signatureKey, $algorithm = 'MD5')
{
$hash = '';

if (isset($signature)) {
if ($algorithm == 'MD5') {
if ($algorithm === 'MD5') {
$hash = md5($message . $signatureKey);
} else if (in_array($algorithm, array('SHA', 'SHA1', 'SHA-1'))) {
$hash = sha1($message . $signatureKey);
} else if (in_array($algorithm, array('SHA-256', 'SHA256', 'SHA_256'))) {
} else {
$hash = hash('sha256', $message . $signatureKey);
}

Expand Down

0 comments on commit c40845e

Please sign in to comment.