Skip to content

Commit 1db1678

Browse files
authored
Update SimplePay.php
1 parent 7af2946 commit 1db1678

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

Diff for: Source/V2/SimplePay.php

+11-11
Original file line numberDiff line numberDiff line change
@@ -693,7 +693,7 @@ public function runIpnConfirm()
693693
header('Content-type: application/json');
694694
header('Signature: ' . $this->ipnReturnData['signature']);
695695
print $this->ipnReturnData['confirmContent'];
696-
} catch (Exception $e) {
696+
} catch (\Exception $e) {
697697
$this->writeLog(['ipnConfirm' => $e->getMessage()]);
698698
return false;
699699
}
@@ -906,14 +906,14 @@ public function isCheckSignature($data = '', $signatureToCheck = '')
906906
try {
907907
if ($this->phpVersion === 7) {
908908
if (!hash_equals($this->config['computedSignature'], $signatureToCheck)) {
909-
throw new Exception('fail');
909+
throw new \Exception('fail');
910910
}
911911
} elseif ($this->phpVersion === 5) {
912912
if ($this->config['computedSignature'] !== $signatureToCheck) {
913-
throw new Exception('fail');
913+
throw new \Exception('fail');
914914
}
915915
}
916-
} catch (Exception $e) {
916+
} catch (\Exception $e) {
917917
$this->logContent['hashCheckResult'] = $e->getMessage();
918918
return false;
919919
}
@@ -983,9 +983,9 @@ public function runCommunication($url = '', $data = '', $headers = [])
983983
$this->curlInfo = curl_getinfo($curlData);
984984
try {
985985
if (curl_errno($curlData)) {
986-
throw new Exception(curl_error($curlData));
986+
throw new \Exception(curl_error($curlData));
987987
}
988-
} catch (Exception $e) {
988+
} catch (\Exception $e) {
989989
$this->logContent['runCommunicationException'] = $e->getMessage();
990990
}
991991
curl_close($curlData);
@@ -1112,15 +1112,15 @@ public function writeLog($log = [])
11121112
try {
11131113
if (!is_writable($this->config['logPath'])) {
11141114
$write = false;
1115-
throw new Exception('Folder is not writable: ' . $this->config['logPath']);
1115+
throw new \Exception('Folder is not writable: ' . $this->config['logPath']);
11161116
}
11171117
if (file_exists($logFile)) {
11181118
if (!is_writable($logFile)) {
11191119
$write = false;
1120-
throw new Exception('File is not writable: ' . $logFile);
1120+
throw new \Exception('File is not writable: ' . $logFile);
11211121
}
11221122
}
1123-
} catch (Exception $e) {
1123+
} catch (\Exception $e) {
11241124
$this->logContent['logFile'] = $e->getMessage();
11251125
}
11261126

@@ -1187,9 +1187,9 @@ protected function logToFile($logFile = '', $logText = '')
11871187
{
11881188
try {
11891189
if (!file_put_contents($logFile, $logText, FILE_APPEND | LOCK_EX)) {
1190-
throw new Exception('Log write error');
1190+
throw new \Exception('Log write error');
11911191
}
1192-
} catch (Exception $e) {
1192+
} catch (\Exception $e) {
11931193
$this->logContent['logToFile'] = $e->getMessage();
11941194
}
11951195
unset($logFile, $logText);

0 commit comments

Comments
 (0)