@@ -693,7 +693,7 @@ public function runIpnConfirm()
693
693
header ('Content-type: application/json ' );
694
694
header ('Signature: ' . $ this ->ipnReturnData ['signature ' ]);
695
695
print $ this ->ipnReturnData ['confirmContent ' ];
696
- } catch (Exception $ e ) {
696
+ } catch (\ Exception $ e ) {
697
697
$ this ->writeLog (['ipnConfirm ' => $ e ->getMessage ()]);
698
698
return false ;
699
699
}
@@ -906,14 +906,14 @@ public function isCheckSignature($data = '', $signatureToCheck = '')
906
906
try {
907
907
if ($ this ->phpVersion === 7 ) {
908
908
if (!hash_equals ($ this ->config ['computedSignature ' ], $ signatureToCheck )) {
909
- throw new Exception ('fail ' );
909
+ throw new \ Exception ('fail ' );
910
910
}
911
911
} elseif ($ this ->phpVersion === 5 ) {
912
912
if ($ this ->config ['computedSignature ' ] !== $ signatureToCheck ) {
913
- throw new Exception ('fail ' );
913
+ throw new \ Exception ('fail ' );
914
914
}
915
915
}
916
- } catch (Exception $ e ) {
916
+ } catch (\ Exception $ e ) {
917
917
$ this ->logContent ['hashCheckResult ' ] = $ e ->getMessage ();
918
918
return false ;
919
919
}
@@ -983,9 +983,9 @@ public function runCommunication($url = '', $data = '', $headers = [])
983
983
$ this ->curlInfo = curl_getinfo ($ curlData );
984
984
try {
985
985
if (curl_errno ($ curlData )) {
986
- throw new Exception (curl_error ($ curlData ));
986
+ throw new \ Exception (curl_error ($ curlData ));
987
987
}
988
- } catch (Exception $ e ) {
988
+ } catch (\ Exception $ e ) {
989
989
$ this ->logContent ['runCommunicationException ' ] = $ e ->getMessage ();
990
990
}
991
991
curl_close ($ curlData );
@@ -1112,15 +1112,15 @@ public function writeLog($log = [])
1112
1112
try {
1113
1113
if (!is_writable ($ this ->config ['logPath ' ])) {
1114
1114
$ write = false ;
1115
- throw new Exception ('Folder is not writable: ' . $ this ->config ['logPath ' ]);
1115
+ throw new \ Exception ('Folder is not writable: ' . $ this ->config ['logPath ' ]);
1116
1116
}
1117
1117
if (file_exists ($ logFile )) {
1118
1118
if (!is_writable ($ logFile )) {
1119
1119
$ write = false ;
1120
- throw new Exception ('File is not writable: ' . $ logFile );
1120
+ throw new \ Exception ('File is not writable: ' . $ logFile );
1121
1121
}
1122
1122
}
1123
- } catch (Exception $ e ) {
1123
+ } catch (\ Exception $ e ) {
1124
1124
$ this ->logContent ['logFile ' ] = $ e ->getMessage ();
1125
1125
}
1126
1126
@@ -1187,9 +1187,9 @@ protected function logToFile($logFile = '', $logText = '')
1187
1187
{
1188
1188
try {
1189
1189
if (!file_put_contents ($ logFile , $ logText , FILE_APPEND | LOCK_EX )) {
1190
- throw new Exception ('Log write error ' );
1190
+ throw new \ Exception ('Log write error ' );
1191
1191
}
1192
- } catch (Exception $ e ) {
1192
+ } catch (\ Exception $ e ) {
1193
1193
$ this ->logContent ['logToFile ' ] = $ e ->getMessage ();
1194
1194
}
1195
1195
unset($ logFile , $ logText );
0 commit comments