Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Sometimes ssl connections are slow. Increase max_execution_time to 5 …

…minutes.
  • Loading branch information...
commit 5eeebefba9d5f3b990f392163bee7be078d24d15 1 parent 87cb44a
ethem authored
8 enrol/authorize/authorizenetlib.php
@@ -11,6 +11,7 @@
11 11 define('AN_ENCAP', '"');
12 12
13 13 require_once('const.php');
  14 +require_once('enrol.php');
14 15
15 16 /**
16 17 * Gets settlement date and time
@@ -234,7 +235,12 @@ function authorize_action(&$order, &$message, &$extra, $action=AN_ACTION_NONE)
234 235 return false;
235 236 }
236 237
237   - @ignore_user_abort(true); // this is critical section
  238 + // critical section
  239 + @ignore_user_abort(true);
  240 + if (intval(ini_get('max_execution_time')) > 0) {
  241 + @set_time_limit(300);
  242 + }
  243 +
238 244 fwrite($fp, "POST /gateway/transact.dll HTTP/1.0\r\n" .
239 245 "Host: $host\r\n" . $referer .
240 246 "Content-type: application/x-www-form-urlencoded\r\n" .
1  enrol/authorize/locallib.php
@@ -5,7 +5,6 @@
5 5 }
6 6
7 7 require_once('const.php');
8   -require_once('enrol.php');
9 8 require_once('authorizenetlib.php');
10 9
11 10 define('ORDER_CAPTURE', 'capture');

0 comments on commit 5eeebef

Please sign in to comment.
Something went wrong with that request. Please try again.