Giter Club home page Giter Club logo

Comments (6)

pennadl avatar pennadl commented on June 12, 2024 1

for localhost, a bruteforce workaround could be edit ApiRequestor.php and add these two lines

$curlOptions[CURLOPT_SSL_VERIFYHOST] = FALSE; 
$curlOptions[CURLOPT_SSL_VERIFYPEER] = FALSE;

after

$curlOptions[CURLOPT_FOLLOWLOCATION] = TRUE;

this will avoid to check for a valid certificate

from shippo-php-client.

fgagne avatar fgagne commented on June 12, 2024 1

Another way around this issue is to download the cacert.pem hosted by curl and put it in lib directory where Shippo.php is located.

I have the problem on a Windows 7 computer.

from shippo-php-client.

hackrat avatar hackrat commented on June 12, 2024

I have also tried below mentioned code to check API response. But I am getting a blank response.

"QUOTE", "name" => "Laura Behrens Wu", "company" => "Shippo", "street1" => "Clayton St.", "street_no" => "215", "street2" => "", "city" => "San Francisco", "state" => "CA", "zip" => "94117", "country" => "US", "phone" => "+1 555 341 9393", "email" => "[email protected]", "metadata" => "Customer ID 123456" ); ``` $_requestUrl = 'https://api.goshippo.com/v1/addresses/'; $userName = ''; $userPass = ''; $ch = curl_init($_requestUrl); $headers = array("Content-Type: application/json"); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET"); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true); curl_setopt($ch, CURLOPT_USERPWD, $userName.':'.$userPass); curl_setopt($ch, CURLOPT_POSTFIELDS, Zend_Json::Encode($address)); $response = curl_exec($ch); Mage::log('shippo address response:'); Mage::log($response); ``` ?>

from shippo-php-client.

gplcart avatar gplcart commented on June 12, 2024

Things changed in 1.3.2
Add

$curlOptions[CURLOPT_SSL_VERIFYHOST] = false; 
$curlOptions[CURLOPT_SSL_VERIFYPEER] = false;

before

curl_setopt_array($curl, $curlOptions);

in CurlClient.php. Its around line 45

So bad we have to do it manually. Why not to disable the verifier automatically on test token?

from shippo-php-client.

gplcart avatar gplcart commented on June 12, 2024

@francois-g Better yet, thanks.

from shippo-php-client.

Bit-Coin avatar Bit-Coin commented on June 12, 2024

we have to change following contents.
\Shippo\Shippo\CurlClient.php
go to line 44 and add these lines:

        $curlOptions[CURLOPT_SSL_VERIFYPEER] = false;
        $curlOptions[CURLOPT_SSL_VERIFYHOST] = false;

from shippo-php-client.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.