Added an ability to provide Curl Options in Configuration

- Removed http.Retry, and http.ConnectionTimeout from configuration
- Added ability to provide Constant and its value in Configuration File
This commit is contained in:
japatel
2015-01-10 21:04:24 -06:00
parent 810fe7994c
commit dd99971e50
6 changed files with 34 additions and 9 deletions

View File

@@ -72,12 +72,12 @@ function getApiContext($clientId, $clientSecret)
$apiContext->setConfig(
array(
'mode' => 'sandbox',
'http.ConnectionTimeOut' => 30,
'log.LogEnabled' => true,
'log.FileName' => '../PayPal.log',
'log.LogLevel' => 'FINE',
'validation.level' => 'log',
'cache.enabled' => true,
// 'http.CURLOPT_CONNECTTIMEOUT' => 30
// 'http.headers.PayPal-Partner-Attribution-Id' => '123123123'
)
);

View File

@@ -8,8 +8,10 @@ acct1.ClientSecret = EGnHDxD_qRPdaLdZz8iCr8N7_MzF-YHPTkjs6NKYQvQSBngp4PTTVWkPZRb
;Connection Information
[Http]
http.ConnectionTimeOut = 30
http.Retry = 1
; Add Curl Constants to be configured
; The settings provided in configurations would override defaults
; if provided in configurations
http.CURLOPT_CONNECTTIMEOUT = 30
; Adding HTTP Headers to each request sent to PayPal APIs
;http.headers.PayPal-Partner-Attribution-Id = 123123123