Skip to content

Commit

Permalink
Merge pull request #54 from coatesap/patch-1
Browse files Browse the repository at this point in the history
Make sure Curl uses TLS >= v1.2. Fixes #53.
  • Loading branch information
delatbabel authored Aug 6, 2016
2 parents cb2d26a + a3f0b24 commit 3d21b68
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/Message/AbstractRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,13 @@ public function getHttpMethod()

public function sendData($data)
{
// Stripe only accepts TLS >= v1.2, so make sure Curl is told
$config = $this->httpClient->getConfig();
$curlOptions = $config->get('curl.options');
$curlOptions[CURLOPT_SSLVERSION] = 6;
$config->set('curl.options', $curlOptions);
$this->httpClient->setConfig($config);

// don't throw exceptions for 4xx errors
$this->httpClient->getEventDispatcher()->addListener(
'request.error',
Expand Down

0 comments on commit 3d21b68

Please sign in to comment.