Closed benhbenny closed 8 years ago
Hi Benhy,
Our Sandbox server might have been a little slow at the time you tried to send your request. I just tried it now and it seems to work fine. Could you give it another try and tell us if you keep getting an error?
Best wishes for 2016,
Youssef - SlimPay.
Hi, We are just trying to create document using hapi browser/hapiclient-php (https://devslimpaycom/hapi/browser#create-documents) But we get that error : cURL error 7: Failed to connect to api-sandboxslimpaynet port 443: Timed out
have you any ideas about that error
Reply to this email directly or view it on GitHubhttps://github.com/SlimPay/hapiclient-php/issues/1.
curl error 7 · Issue #1 · SlimPay/hapiclient-phphttps://github.com/SlimPay/hapiclient-php/issues/1 github.com Hi, We are just trying to create document using hapi browser/hapiclient-php (https://dev.slimpay.com/hapi/browser#create-documents) . But we get that error : cURL error 7: Failed to connect to api...
Hello youssef, thanks for your reply and best whishes we try again but before we added in HapiClient.php (contrustor somethings like :1: new Client(['base_url' => $baseUrl, 'defaults' => ['proxy' => 'proxy.adress']])) and we don't get the same error . So what is the best way to define proxy using hapiClient-php ?
We try another exemple create an order to sign an document (https://dev.slimpay.com/hapi/browser#create-orders) , with ourscredit, ourssecret define an document template but getting 403 forbidden
The Guzzle Client is configured for a default and generic use. For specific configurations, you can use $hapiClient->getClient() to retrieve the GuzzleHttp\Clienthttp://guzzle.readthedocs.org/en/5.3/index.html. Since it is passed by reference, any change to its configuration will be passed to the following $hapiClient calls. E.g. $hapiClient->getClient()->setDefaultOption('proxy', '192.168.16.1:10');
Regarding the 403 forbidden, you are trying to use a document template (given in the example) that belongs to democreditor. Since you are using your own app, you would have to upload your own document template in your Back Office.
If you do not have access yet, you can ask for a Back Office access on the test platform by sending a request to ticketing@slimpay.com. Don't forget to specify the platform (test) and your App ID.
De : Benhy D. notifications@github.com Envoyé : mardi 5 janvier 2016 14:51 À : SlimPay/hapiclient-php Cc : YoussefBO Objet : Re: [hapiclient-php] curl error 7 (#1)
Hello youssef, thanks for your reply and best whishes we try again but before we added in the guzzle (contrustor somethings like default =>[proxy.adress]) and we don't get the same error . So what is the best way to define proxy using hapiClient-php ?
We try another exemple create an order to sign an document (https://dev.slimpay.com/hapi/browser#create-orders) , with ourscredit, ourssecret define an document template but getting 403 forbidden
Reply to this email directly or view it on GitHubhttps://github.com/SlimPay/hapiclient-php/issues/1#issuecomment-168990724.
Hello Youssef, thanks a lot for your help, the mistake was the creditorReference definition we find the good one and all it ok
And like you tell me we change the proxy definition
Best regards :+1:
Hello @benhbenny i have the same problem in the same application in localhost ?
Hi @yagami271. Normally since guzzle v6 version you may use PHP putenv to set your proxy environnement in locolhost. putenv('HTTPS_PROXY='.$your_proxy);
. Otherwise your can use $hapiClient->getClient()->setDefaultOption('proxy', $proxy);
as suggested by YoussefBO
@benhbenny the solution We cant set the proxy of the Client because HapiClient instanciate client with only baseUrl. the client search the Env vairbale HTTPS_PROXY, so i set it but still not working i restart my camputer and it's work
hope it's help others ...
Hi, We are just trying to create document using hapi browser/hapiclient-php (https://dev.slimpay.com/hapi/browser#create-documents) . But we get that error : cURL error 7: Failed to connect to api-sandbox.slimpay.net port 443: Timed out
have you any ideas about that error