Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

What lines should you change for the production server?


lplplpx3

Recommended Posts

Have been upgraded to USPS production server but continue to get the error. I have seen in the forums that the URL that might work is: production.shippingapis.com/shippingapi.dll but what line(s) do you change in the following code?

 

$http = new httpClient();

if ($http->Connect('production.shippingapis.com', 80)) {

$http->addHeader('Host', 'production.shippingapis.com');

$http->addHeader('User-Agent', 'osCommerce');

$http->addHeader('Connection', 'Close');

 

if ($http->Get('production.shippingapis.com/shippingapi.dll?' . $request)) $body = $http->getBody();

 

Also the instructions from USPS read:

1. The Production Server URL is: http://production.shippingapis.com. For APIs calling the secure server, the URL is https://secure.shippingapis.com.

 

Under what circumstance should you use the secure URL and where do I need to change http to https in the code above (if needed at all)? FYI the checkout process and beyond on my site is secure. Thank-you.

Link to comment
Share on other sites

I am...I'm using the original module but get error so thought I had to update one of the lines in the code as above. So if using the original I shouldn't have to do anything? FYI, in the control panel I've set Configuration->Shipping/Packaging with the 5 digit zip and other info.

Link to comment
Share on other sites

@@lplplpx3

 

No manual update is required. There is a radio button that you can select either the sandbox or the production server. Just choose the live server if you are ready to go live.

 

 

Chris

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...