Closed MircoBabin closed 3 years ago
I had to think the other way around, providing a HttpClient with the correct settings.
This solution works:
use Http\Adapter\Guzzle6\Client as GuzzleAdapter;
use Omnipay\Common\Http\Client as OmnipayHttpClient;
protected function gateway()
{
$config = [
'proxy' => 'localhost:8888',
'verify' => false, //UNSAFE: ignore SSL certificate errors
];
$adapter = GuzzleAdapter::createWithConfig($config);
$client = new OmnipayHttpClient($adapter);
$gateway = Omnipay::create('MultiSafepay_Rest', $client);
$gateway->initialize([
'apiKey' => $this->apikey,
'locale' => $this->locale,
'testMode' => $this->testaccount,
]);
return $gateway;
}
Dear Omnipay,
I installed the default settings of Omnipay with
composer require league/omnipay:^3 omnipay/multisafepay
.I want to use Telerik Fiddler as proxy server to debug an issue I have with the multisafepay gateway. But I don't know how to set a proxy server. I know the requests are HTTPS requests, but that's not a problem, Fiddler can act as an HTTPS man-in-the-middle proxy and intercept anything.
protected $httpClient
property of the AbstractGateway, so I can try to set Guzzle proxy server options ?This is the code I'm currently using in my project. I want to implement the commented line.
Kind Regards, Mirco Babin