You are here

public static function PayPalCheckoutClient::setDefaultCurlOptions in Commerce PayPal 7.2

Sets the default cURL options.

2 calls to PayPalCheckoutClient::setDefaultCurlOptions()
PayPalCheckoutClient::acquireAccessToken in modules/checkout/lib/PayPalCheckoutClient.php
Acquire an access token from PayPal.
PayPalCheckoutClient::submitRequest in modules/checkout/lib/PayPalCheckoutClient.php
Submits an API request to the PayPal server.

File

modules/checkout/lib/PayPalCheckoutClient.php, line 65
Defines a class for consuming the PayPal Checkout API.

Class

PayPalCheckoutClient
Defines the PayPalCheckoutClient class.

Code

public static function setDefaultCurlOptions($ch) {
  curl_setopt($ch, CURLOPT_HEADER, FALSE);
  curl_setopt($ch, CURLINFO_HEADER_OUT, TRUE);
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
  curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, TRUE);
  curl_setopt($ch, CURLOPT_VERBOSE, FALSE);
  curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30);
  curl_setopt($ch, CURLOPT_TIMEOUT, 180);
}