1. Go to this page and download the library: Download trendspider/stripe-legacy library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
// set up your tweaked Curl client
$curl = new \Stripe_Legacy\HttpClient\CurlClient();
$curl->setTimeout(10); // default is \Stripe_Legacy\HttpClient\CurlClient::DEFAULT_TIMEOUT
$curl->setConnectTimeout(5); // default is \Stripe_Legacy\HttpClient\CurlClient::DEFAULT_CONNECT_TIMEOUT
echo $curl->getTimeout(); // 10
echo $curl->getConnectTimeout(); // 5
// tell Stripe to use the tweaked client
\Stripe_Legacy\ApiRequestor::setHttpClient($curl);
// use the Stripe API client as you normally would
// set up your tweaked Curl client
$curl = new \Stripe_Legacy\HttpClient\CurlClient(array(CURLOPT_PROXY => 'proxy.local:80'));
// tell Stripe to use the tweaked client
\Stripe_Legacy\ApiRequestor::setHttpClient($curl);