File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ abstract class AuthorizeNetRequest
11
11
protected $ _api_login ;
12
12
protected $ _transaction_key ;
13
13
protected $ _post_string ;
14
- public $ VERIFY_PEER = true ; // Set to false if getting connection errors .
14
+ public $ VERIFY_PEER = true ; // attempt trust validation of SSL certificates when establishing secure connections .
15
15
protected $ _sandbox = true ;
16
16
protected $ _log_file = false ;
17
17
@@ -94,7 +94,10 @@ protected function _sendRequest()
94
94
if ($ this ->VERIFY_PEER ) {
95
95
curl_setopt ($ curl_request , CURLOPT_CAINFO , dirname (dirname (__FILE__ )) . '/ssl/cert.pem ' );
96
96
} else {
97
- curl_setopt ($ curl_request , CURLOPT_SSL_VERIFYPEER , false );
97
+ if ($ this ->_log_file ) {
98
+ file_put_contents ($ this ->_log_file , "----Request---- \nInvalid SSL option \n" , FILE_APPEND );
99
+ }
100
+ return false ;
98
101
}
99
102
100
103
if (preg_match ('/xml/ ' ,$ post_url )) {
You can’t perform that action at this time.
0 commit comments