Post by Cuse » Sun Mar 14, 2021 6:35 am

I received a letter on 3/12/21 from USPS web tools stating that they have identified me as using a unsecure USPS endpoint that will retire and no longer function after 6/24/21. The endpoint is http://production.shippingapis.com, the new secure replacing endpoint is https://production.shippingapis.com. I'm using Opencart version 3.0.2.0 and the stock USPS shipping module that came with Opencart. I have looked at the code in usps.php but do not have the knowledge to change the line of code. Can someone help all of us here for for the future or will I need to purchase a 3rd party USPS module?

Newbie

Posts

Joined
Sun Mar 14, 2021 6:13 am

Post by Johnathan » Mon Mar 15, 2021 1:05 am

I'll be fixing this in my USPS Pro extension in the next update, but for the built-in USPS method, you'd want to do the following edit. The filepath will differ based on your OpenCart version (the first one for OpenCart 1.5 and 2.0-2.2, the second one for OpenCart 2.3 and 3.0):

Code: Select all

IN:
/catalog/model/shipping/usps.php
or
/catalog/model/extension/shipping/usps.php

REPLACE:
curl_setopt($curl, CURLOPT_URL, 'production.shippingapis.com/ShippingAPI.dll?' . $request);

WITH:
curl_setopt($curl, CURLOPT_URL, 'https://production.shippingapis.com/ShippingAPI.dll?' . $request);

Image Image Image Image Image


User avatar
Administrator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by mediatechnology » Mon Mar 15, 2021 3:47 am

Thanks for the post and reply.
The production environment patch works on my 3.0.2 store.
I had posed a similar question in another thread.

USPS is also changing the test URL to https://stg-production.shippingapis.com
Is there another location that needs to be changed for the test environment?
I didn't see it referenced in \catalog\model\extension\shipping\usps.php

Thanks again!
Wayne


Posts

Joined
Sat Mar 13, 2021 4:42 am

Post by Cue4cheap » Mon Mar 15, 2021 5:55 am

mediatechnology wrote:
Mon Mar 15, 2021 3:47 am
Is there another location that needs to be changed for the test environment?
I didn't see it referenced in \catalog\model\extension\shipping\usps.php

Thanks again!
Wayne
The built in USPS doesn't have a test mode so it doesn't apply to that USPS shipping module.

Mike

cue4cheap not cheap quality


Expert Member

Posts

Joined
Fri Sep 20, 2013 4:45 am
Who is online

Users browsing this forum: No registered users and 149 guests