PayPal\Core\PayPalHttpConfig::setHttpRetryCount PHP Method

setHttpRetryCount() public method

Set Http Retry Counts
public setHttpRetryCount ( integer $retryCount )
$retryCount integer
    public function setHttpRetryCount($retryCount)
    {
        $this->retryCount = $retryCount;
    }

Usage Example

 /**
  * Default Constructor
  *
  * @param PayPalHttpConfig $httpConfig
  * @param array            $config
  * @throws PayPalConfigurationException
  */
 public function __construct(PayPalHttpConfig $httpConfig, array $config)
 {
     if (!function_exists("curl_init")) {
         throw new PayPalConfigurationException("Curl module is not available on this system");
     }
     $this->httpConfig = $httpConfig;
     $this->httpConfig->setHttpRetryCount($config['http.Retry']);
     $this->logger = PayPalLoggingManager::getInstance(__CLASS__);
 }