affilinet / productdata-php-sdk

Documentation and Code Package of PHP SDK for affilinet Product Data Webservices

Home Page:http://developer.affili.net/productdata-php-sdk/documentation/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Didnt work properly under local windows environments

benjaminfunk opened this issue · comments

The problem is the missin SSl certificate.

Give us more control over the Guzzle instance to deactivate the SSL verification

cURL error 60: SSL certificate problem: unable to get local issuer certificate

Hi @benjaminfunk ,
Sorry for late reply.

You have full control over Guzzle Instance. You can also use an existing guzzle instance:

// create a guzzle client
$guzzle = new GuzzleHttp\Client(
    [
        'timeout'         => 0,
        'allow_redirects' => false,
        'proxy'           => '192.168.16.1:10',
        'verify'           => false /** DANGER: NEVER USE IN PRODUCTION */
    ]
);
// create the internal httpClient
$httpClient = new \Affilinet\ProductData\HttpClient\GuzzleClient($guzzle);

// the final config
$config = [
    'publisher_id' => '123456789',
    'product_webservice_password' => '123456789',
    'http_client' => $httpClient,
];
// and here it is
$affilinet = new \Affilinet\ProductData\AffilinetClient($config);
`