Comments (6)
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.
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.
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.
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.
@francois-g Better yet, thanks.
from shippo-php-client.
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)
- No Rates available "FROM" other countries "TO" other countries as well as TO United States FROM other countries HOT 2
- How to get rates including usps flat?
- Shipping Rates is empty from_address BD
- How Can I get the to_address from a Shippo_Transaction HOT 1
- Empty extra array results in API failure HOT 2
- {"parcels": [{"extra": ["Invalid format of the 'extra' object. The accepted format is 'extra': {}"]}]} HOT 1
- Incorrect API response
- PHP7.4 array access violation HOT 1
- Support Orders HOT 1
- Shippo Will not Sync Woocommerce Orders with Litespeed Cache HOT 1
- Circular documentation, error messages go where? HOT 2
- Create Shipment with Multiple Parcels not working HOT 4
- Shipment Tracking
- How to pass package Info from Shippo creating order API HOT 1
- Transactions array provided in order details endpoint is incomplete and incorrect.
- OAuth : Transaction details endpoint gives 404.
- Rates at Checkout
- Shipment
- Floating Point Number problem in CurlClient
- Issue when using PHP 8.2+ HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from shippo-php-client.