/** * Creates the Static SoapClient * * The soap_version element is used to indicate whether you are using SOAP 1.1 or SOAP 1.2 * The exceptions option is a boolean value defining whether soap errors throw exceptions of type SoapFault. * * Setting the boolean trace option enables use of the methods SoapClient->__getLastRequest, SoapClient->__getLastRequestHeaders, * SoapClient->__getLastResponse and SoapClient->__getLastResponseHeaders * * The trace option is necessary if you will need to use the SoapClient->__getLastRequest() or SoapClient->__getLastReponse() methods * later for debugging purposes. The connection_timeout option defines a timeout in seconds for the connection to the SOAP service. * I have set it to 10 minutes. * * If for any reason you believe you software is going to take longer than usually, please feel free to * adjust the maximum_execution_time value either during runtime or in the php.ini configuration file. * * @access public */ public static function registerSoapClient() { $clientOptions = array("soap_version" => SOAP_1_1, "exceptions" => true, "trace" => true, "connection_timeout " => API_CONNECTION_TIMEOUT); if (!class_exists('ActiveRecordModel', false)) { ClassLoader::import('application.model.ActiveRecordModel'); } $config = ActiveRecordModel::getApplication()->getConfig(); if ($config->get('PROXY_HOST')) { $clientOptions['proxy_host'] = $config->get('PROXY_HOST'); $clientOptions['proxy_port'] = $config->get('PROXY_PORT'); } PayPalBase::setSoapClient(new PayPalSoapClient(PayPalBase::$isLive ? LIVE_WSDL : SANDBOX_WSDL, $clientOptions)); }