Error occurred after call api.

Posted in General by Nitish Sat Apr 23 2016 17:53:43 GMT+0000 (UTC)·10·Viewed 750 times

Fatal error: Uncaught exception 'ShippingEasy_ApiConnectionError' with message 'Could not verify ShippingEasy's SSL certificate. Please make sure that your network is not intercepting certificates. (Try going to https://app.shippingeasy.com in your browser.) If this problem persists, let us know at support@shippingeasy.com. (Network error [errno 60]: SSL certificate problem: unable to get local issuer certificate)' in E:\xampp\htdocs\demo\shipping_easy\lib\ShippingEasy\ApiRequestor.php:173 Stack trace: #0 E:\xampp\htdocs\demo\shipping_easy\lib\ShippingEasy\ApiRequestor.php(147): ShippingEasy_ApiRequestor->handleCurlError(60, 'SSL certificate...') #1 E:\xampp\htdocs\demo\shipping_easy\lib\ShippingEasy\ApiRequestor.php(90): ShippingEasy_ApiRequestor->_curlRequest('post', 'https://app.shi...', Array, Array) #2 E:\xampp\htdocs\demo\shipping_easy\lib\ShippingEasy\ApiRequestor.php(43): ShippingEasy_ApiRequestor->_requestRaw('post', '/partners/api/s...', Array, Array, '806e63a2370dbc4...', 'aa52d8ba85d2bcf...') #3 E:\xampp\h in E:\xampp\htdocs\demo\shipping_easy\lib\ShippingEasy\ApiRequestor.php on line 173
Jack Ship
Apr 23, 2016

Nitish: what happens when you try to access app.shippingeasy.com from a browser that is running on the same system as the code that got this error?

Nitish
Apr 24, 2016

i was testing in local server and when i ran my code then it's showing error(which is mention in my previous post.). So , i request you to figure out from this problem.

freki lin
Aug 11, 2017

I also encountered the same mistake, I visited the website is normal

Jack Ship
Aug 11, 2017

freki lin: You mentioned that you visited the website "normal." Just to confirm: were you using a browser that was on the exact same system where you were running your PHP code?

freki lin
Aug 11, 2017

Yes, my test environment is my local computer

freki lin
Aug 11, 2017

Yes, my test environment is my local computer

Jack Ship
Aug 11, 2017

freki lin: If your browser can access app.shippingeasy.com then that indicates that there is no network connectivity problem between your system and our data center. So that's good.

In addition, your browser's access provides evidence that the problem is not with the SSL certificate on app.shippingeasy.com.

I suspect the problem is within the configuration of the PHP runtime in your environment. This thread has some suggestions on how to resolve:

https://stackoverflow.com/questions/24611640/curl-60-ssl-certificate-unable-to-get-local-issuer-certificate

freki lin
Aug 12, 2017

hi barry
I solved the error code: 60
But
Fatal error: Uncaught exception 'ShippingEasy_ApiError' with message 'Invalid response object from API: {"status":"500","error":"Internal Server Error"} (HTTP response code was 500)' in D:\phpStudy\shippingeasy\lib\ShippingEasy\ApiRequestor.php:52 Stack trace: #0 D:\phpStudy\shippingeasy\lib\ShippingEasy\ApiRequestor.php(102): ShippingEasy_ApiRequestor->handleApiError('{"status":"500"...', 500, Array) #1 D:\phpStudy\shippingeasy\lib\ShippingEasy\ApiRequestor.php(44): ShippingEasy_ApiRequestor->_interpretResponse('{"status":"500"...', 500) #2 D:\phpStudy\shippingeasy\lib\ShippingEasy\Object.php(10): ShippingEasy_ApiRequestor->request('post', '/api/stores/6a4...', NULL, Array, 'e3aa524f8ea875d...', '4f9d853704695c2...') #3 D:\phpStudy\shippingeasy\lib\ShippingEasy\Order.php(12): ShippingEasy_Object->request('post', '/api/stores/6a4...', NULL, Array) #4 D:\phpStudy\shippingeasy\index.php(9): ShippingEasy_Order->create() #5 {main} thrown in D:\phpStudy\shippingeasy\lib\ShippingEasy\ApiRequestor.php on line 52

can you help me
thanks

Jack Ship
Aug 12, 2017

freki lin: I removed your other question, as you had requested.

Meanwhile, an HTTP response code of 500 typically indicates that the order data was not correctly formatted in your request. The two key things to watch out for are that the recipients and line_items are both arrays of array.

An example is shown here: https://gist.github.com/twmills/8711096

Jack Ship
Aug 12, 2017

freki lin: I removed your other question, as you had requested.

Meanwhile, an HTTP response code of 500 typically indicates that the order data was not correctly formatted in your request. The two key things to watch out for are that the recipients and line_items are both arrays of array.

An example is shown here: https://gist.github.com/twmills/8711096

  
Markdown is allowed