Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] - USPS Methods


Recommended Posts

I've been using the USPSMethods 2.8d module for a few months now successfully.

 

On 4/27/06 I received an email from USPS that they will being requiring HTTPS connections starting in September 30, 2006 and the old HTTP connections to http://production.shippingapis.com will go away.

 

Has anyone addressed the changes necessary to update USPSMethods 2.8d to go to:

 

https://secure.shippingapis.com

Your help is much appreciated.

Nathan

 

 

I too am needing to make this change. I assume that both the sever adress needs to be changed as well as http needs to be changed to https. I see where these entries are in the usps.php file but am unsure as to how to implement the changes.

 

The address change seems fairly obvious...

switch (MODULE_SHIPPING_USPS_SERVER) {
	case 'production': $usps_server = 'production.shippingapis.com';
					   $api_dll = 'shippingapi.dll';
					   break;

 

should be changed to

switch (MODULE_SHIPPING_USPS_SERVER) {
	case 'production': $usps_server = 'secure.shippingapis.com';
					   $api_dll = 'shippingapi.dll';
					   break;

 

My question is with changing the http to https. Here is the current code.

$http = new httpClient();
  if ($http->Connect($usps_server, 80)) {
	$http->addHeader('Host', $usps_server);
	$http->addHeader('User-Agent', 'osCommerce');
	$http->addHeader('Connection', 'Close');

	if ($http->Get('/' . $api_dll . '?' . $request)) $body = $http->getBody();
//  mail('[email protected]','USPS rate quote response',$body,'From: <[email protected]>');
	if ($transit && is_array($transreq) && ($order->delivery['country']['id'] == STORE_COUNTRY)) {
	  while (list($key, $value) = each($transreq)) {
		if ($http->Get('/' . $api_dll . '?' . $value)) $transresp[$key] = $http->getBody();
	  }
	}

	$http->Disconnect();

 

Would someone please show me what I should change to make this work with https? Is it as easy as just changing the port from 80 to 445? I might just have to test it out and report my findings.

Link to comment
Share on other sites

Hello,

 

Could anybody please tell me how I can add Flat Rate Box and Flat Rate Envelope to Domestic Shipping Methods? These options are not even listed among domestic services. The only options I have in my admin/shipping modules/usps are:

Domestic Shipping Methods

 

Express

Priority

First Class

Parcel

BPM

Library

Media

 

Int'l Shipping Methods

 

GXG Document

GXG Non-Document

Express

Priority Lg

Priority Sm

Priority Var

Airmail Letter

Airmail Parcel

Surface Letter

Surface Post

Any help would be appreciated.

 

Thanks.

Link to comment
Share on other sites

On 4/27/06 I received an email from USPS that they will being requiring HTTPS connections starting in September 30, 2006 and the old HTTP connections to http://production.shippingapis.com will go away.

 

Has anyone addressed the changes necessary to update USPSMethods 2.8d to go to:

 

https://secure.shippingapis.com

 

Has anyone solved this yet?

 

thanks,

Deborah

Edited by Skeetergirl
Link to comment
Share on other sites

On 4/27/06 I received an email from USPS that they will being requiring HTTPS connections starting in September 30, 2006 and the old HTTP connections to http://production.shippingapis.com will go away.

 

Has anyone addressed the changes necessary to update USPSMethods 2.8d to go to:

 

https://secure.shippingapis.com

 

Has anyone solved this yet?

 

thanks,

Deborah

 

 

From what I am now reading the new changes from the USPS don't effect the USPS Methods module. Only the api calls listed in the USPS email are effected. The rate checking is not passing any personal info so no SSL is required.

Link to comment
Share on other sites

Ok I'm am using "United Parcel Service" for shipping I do not remember if I aded a contribution or not but whem I hit edit i see

 

"Enable UPS Shipping

Do you want to offer UPS shipping?

 

True

False

 

UPS Pickup Method

How do you give packages to UPS? CC - Customer Counter, RDP - Daily Pickup, OTP - One Time Pickup, LC - Letter Center, OCA - On Call Air

 

 

UPS Packaging?

CP - Your Packaging, ULE - UPS Letter, UT - UPS Tube, UBE - UPS Express Box

 

 

Residential Delivery?

Quote for Residential (RES) or Commercial Delivery (COM)

 

 

Handling Fee

Handling fee for this shipping method.

 

 

Tax Class

Use the following tax class on the shipping fee.

 

 

Shipping Zone

If a zone is selected, only enable this shipping method for that zone.

 

 

Sort order of display.

Sort order of display. Lowest is displayed first.

 

 

Shipping Methods

Select the USPS services to be offered.

 

1DM

1DML

1DA

1DAL

1DAPI

1DP

1DPL

2DM

2DML

2DA

2DAL

3DS

GND

STD

XPR

XPRL

XDM

XDML

XPD

 

update Cancel

"

 

 

 

My problem is that i choose all the Shipping Methods but when i press update nothing is seleced

at the end of the day the code will be good

Link to comment
Share on other sites

  • 1 month later...

Is anyone else having problems with USPS Methods over the last week or so?

 

I have been using this for a year without problems. Sunday and again today, it is causing a "page cannot be displayed error" when you press checkout and go to the "checkout_shipping.php" page. If I disable USPS Methods, the flat rate and free shipping options work just fine.

 

Monday through this morning, it was working fine again.

 

Any ideas on how to debug this?

 

Thanks,

Brian

Link to comment
Share on other sites

Well, still no luck.

 

I've looked at the output from USPS and it looks correct. (by enabling the email function to send the output received)

 

I've uninstalled/reinstalled, tried all combinations of shipping methods possible.

 

I just don't understand. Could it be a server issue in some way?

 

Thanks,

Brian

Link to comment
Share on other sites

  • 1 month later...

I have a question. While I'm waiting for the USPS to enable the account is the account number the same number I use for a password? When I got the first response from USPS that's all they gave me and I don't see anything else I need to do. Thanks in advance, Steve Lewis

Link to comment
Share on other sites

I have a question. While I'm waiting for the USPS to enable the account is the account number the same number I use for a password? When I got the first response from USPS that's all they gave me and I don't see anything else I need to do. Thanks in advance, Steve Lewis

 

Just leave the password field blank and it should work fine. USPS doesn't issue passwords anymore.

Link to comment
Share on other sites

Hi all,

 

Quick question. I only want to offer USPS for international shipments and not domestic. If I uncheck all of the domestic options in admin I get the "An error occured with the USPS shipping calculations. If you prefer to use USPS as your shipping method, please contact the store owner."

 

Is there a way that if none of the options are chosen it doesn't display at all? Any help would be appreciated.

 

Thanks

 

Steve

Link to comment
Share on other sites

Weird Server Errors, Settings, etc...

 

(I'm assuming these are the problems seen with the "test" version of the USPS server).

 

Impatient to wait for my account to be turned to the production server, I've been playing with the USPS Methods mod and XML submissions. I got into the usps.php file and started intercepting the generated request replacing it with one below. Seeing some weird results.

 

The first being that I can't seem to find any XML submission strings that work correctly except:

 

<RateV2Request USERID="XXXXXX" PASSWORD="">
<Package ID="0">
	<Service>All</Service>
	<ZipOrigination>10022</ZipOrigination>
	<ZipDestination>20008</ZipDestination>
	<Pounds>10</Pounds>
	<Ounces>5</Ounces>		
	<Size>LARGE</Size>
	<Machinable>True</Machinable>
</Package>
</RateV2Request>

Response:

<?xml version="1.0"?>
<RateV2Response><Package ID="0"><ZipOrigination>10022</ZipOrigination><ZipDestination>20008</ZipDestination>
<Pounds>10</Pounds><Ounces>5</Ounces><Size>LARGE</Size>
<Machinable>TRUE</Machinable><Zone>3</Zone><Postage><MailService>Express Mail to PO Addressee</MailService><Rate>39.20</Rate></Postage><Postage><MailService>Priority Mail</MailService><Rate>8.95</Rate></Postage><Postage><MailService>Parcel Post</MailService><Rate>7.80</Rate></Postage><Postage><MailService>Bound Printed Matter</MailService><Rate>3.53</Rate></Postage><Postage><MailService>Media Mail</MailService><Rate>5.14</Rate></Postage><Postage><MailService>Library Mail</MailService><Rate>4.91</Rate></Postage></Package></RateV2Response>

 

The "ShippingAPITest.dll" at "production.shippingapis.com" (yes -- it seems that the only thing that matters is the actual API filename to distinguish between test and production) freaks out if I submit any other origin or destination zip code, or even reverse them. I get:

 

<?xml version="1.0"?>
<Error><Number>-2147219490</Number><Source>Rate_Respond;SOLServerRatesTest.RateV2_Respond</Source><Description>Invalid value for origin ZIP Code.</Description><HelpFile></HelpFile><HelpContext>1000440</HelpContext></Error>

 

If I leave the origin zip alone and change the destination zip, I get this:

 

<?xml version="1.0"?>
<Error><Number>-2147219489</Number><Source>Rate_Respond;SOLServerRatesTest.RateV2_Respond</Source><Description>Invalid value for destination ZIP Code.</Description><HelpFile></HelpFile><HelpContext>1000440</HelpContext></Error>

 

If I screw with the XML request for pounds, or size, increasing them by even 1, I'll get these:

 

<?xml version="1.0"?>
<Error><Number>-2147219492</Number><Source>Rate_Respond;SOLServerRatesTest.RateV2_Respond</Source><Description>Invalid value for pounds.</Description><HelpFile></HelpFile><HelpContext>1000440</HelpContext></Error>

 

<?xml version="1.0"?>
<Error><Number>-2147219487</Number><Source>Rate_Respond;SOLServerRatesTest.RateV2_Respond</Source><Description>Invalid value for package size.</Description><HelpFile></HelpFile><HelpContext>1000440</HelpContext></Error>

 

Is "ShippingAPITest.dll" totally locked except to specific values?

 

Is this why the mod instructs to request a production account immediately?

 

Any input appreciated. Thanks!

Link to comment
Share on other sites

Installed this mod today and it solved my international shipping issues. Thank you.

 

I have a slight problem and I have read all pages of this topic and nothing is posted. On my international orders only, I am getting just the USPS Global Express Mail (EMS) to show as a shipping option. I have tried several countries, such as New Zealand, Poland and the UK, all of them give me the same result.

 

I have Express, Airmail and Economy selected in the International shipping options inside the ADMIN, but only the one choice shows for customers.

 

I'm using the latest version 2.8d and OSC MS 2.2

 

Grateful for any help :thumbsup:

Anyone can buy a camera... it's what you do with it that counts!

Sticky Pod

www.stickypod.com

Link to comment
Share on other sites

  • 4 weeks later...

Greetings,

 

I have installed USPS Methods 2.8d, however when navigating the configuration console, and selecting EDIT for USPS Methods - the side edit column does not appear. Any clues as to why would be appreciated. I am currently re-uploading the install files, and skimming the code.

Link to comment
Share on other sites

Greetings,

 

I have installed USPS Methods 2.8d, however when navigating the configuration console, and selecting EDIT for USPS Methods - the side edit column does not appear. Any clues as to why would be appreciated. I am currently re-uploading the install files, and skimming the code.

 

The above issue seems to be resolved by placing the contribution files located in folder "admin" to /store/admin on my server.... rather then placing them in the root admin folder.

 

If this is incorrect, please do correct me.

Link to comment
Share on other sites

  • 1 month later...

I've recently installed USPS Methods 2.8d on a fresh installation of osCommerce 2.2 Milestone 2 Update 060817. All seemed well until I started doing real purchase tests. Here's what's happening:

 

If I leave the options in CONFIGURATION > SHIPPING/PACKAGING for Maximum Package Weight and Tare Weight blank, and make a purchase, all the options that are checked in the contrib show up on the shipping checkout page, but with a value of $0.00.

 

If I change the Tare Weight, nothing different happens.

 

If I change the Maximum Package Weight, I only get one of the 2 checked shipping options.

 

=========

 

So, to clarify:

 

If I leave the Maximum Package Weight field blank, and I have "Priority" and "First Class" checked as domestic shipping options in the USPS Shipping Module, I get this on the Shipping Page during checkout:

 

United States Postal Service (0 x 0.1lbs) United States Postal Service

First-Class Mail (2 - 5 Days) $0.00

Priority (2 - 3 Days) $0.00

 

...which is wrong - the weight should be 1 lbs

 

----

 

If I set a weight in Maximum Package Weight, I only get Priority Shipping as an option on the Shipping Page during checkout; First Class doesn't show up as an option, at all:

 

United States Postal Service (1 x 1lbs) United States Postal Service

Priority (2 - 3 Days) $4.05

 

...which is correct, but First-Class Mail isn't offered.

 

----

 

Yes, I signed up for a USPS account; yes, it was validated by USPS; yes, it's been set to the production server. I tried checking out http and https, and it does the same thing either way. I haven't been able to find anything in this message board that addresses this.

 

So... any ideas? Is there some factor that I'm missing that affects whether or not First-Class Mail is offered as an option? Is there a reason you have to set the Max Weight before this mod works?

 

Am I missing something obvious?

 

Help? :)

Link to comment
Share on other sites

  • 3 weeks later...
Thanks for your reply Dave

Currently what is displayed at the Dilivery information page is

So that is one item at 6.5 lbs but it should be one item at 6.5 ounces.

You can check it out yourself at http://www.kolympia.com/Shop/

currently there are no payment methods defined so you can use the 4111 credit card method to make a test sale.

The problem for me is that I have 580 products entered and having to edit them all to reflect the math of oz to lbs is something that I would rather avoid.

Christian

 

 

 

Ive spent days searching, trying this and trying that... nothing has helped YET.

My items range from very-very light (30 to equal 1 ounce) to books, toys, etc that would weight 1 or 2 pounds. My only shipping method is USPS, and I am on the production server (running fine)

Now I have never claimed to be the sharpest tool in the shed, but if someone could help me a little, I am willing to try editing my php files.

 

The smallest weight I can enter is 0.01, right? so 100 of these is showing up as 1 pound

If it takes 30 of an item to equal 1 ounce, how do I enter that, what do I need to change. I do not sell them in bundles of 30, but rather by the piece. So If someone bought 30, they should only be charged for 1 ounce of shipping.... Please... Im a grown woman begging... Anyone know how to fix this?

 

Thanks

Tammy O

Link to comment
Share on other sites

I have just installed this contribution and have a couple of problems. I also found this in the forum but not answered.

 

When I go to enable USPS, instead of being able to check the boxes for displaying weight and/or transit time if desired and select the domestic (US) and international shipping methods to be offered, there are 3 empty boxes at the end that were not there with the original USPS enabled (before contribution).

 

Also, in the shop, I don't have an option to choose shipping but get this message:

 

An error occured with the USPS shipping calculations.

If you prefer to use USPS as your shipping method, please contact the store owner.

 

I am in production mode with USPS and all the coding is done. Did I miss something???

 

Marcia

Link to comment
Share on other sites

  • 1 month later...

Further evidence that this contribution is not, in fact, supported - I asked perfectly reasonable questions more than 2 months ago (11/20/2006), and there haven't been any useful responses in that time. Phooey. If you're reading this and you haven't installed this contribution yet, hey - DON'T. When it doesn't work correctly, nobody will help you.

Link to comment
Share on other sites

  • 2 months later...

Hello all,

 

just received this meesage from USPS:

 

----- Original Message ----- 
From: USPS Internet Customer Care Center 
To: undisclosed-recipients: 
Sent: Wednesday, March 21, 2007 9:32 PM
Subject: United States Postal Service® Action Required for Web Tools APIs 


We are informing you that USPS Web Tools will be implementing changes due to the May 2007 Rate Changes.



In May, the U.S. Postal Service (USPS) will implement the new Rates in accordance with the Federal Register, to adjust postage prices to cover operational costs and respond to changes in the marketplace.  With this change, the USPS Web Tools will release new version iterations and corresponding XML schemas for the APIs: domestic rates, international label and custom forms APIs.



The international APIs:  Global Label Express Mail, Global Label Priority Mail and Global Label Airmail Parcel Post will be realigned to three new services: Express Mail International, Priority Mail International and First Class Mail International.  Within these services, two new service types, Express Mail International Flat Rate Envelope and Priority Mail International Flat Rate Box will be added to the Web Tools international APIs.



The Domestic Rate API V2 will be modified and can be used after the release of Rate V3 for other than Large Priority Mail pieces.



A staging environment will be available in early April.  Updated user documentation will be posted on USPS.com at [url="http://www.usps.com/webtools"]http://www.usps.com/webtools[/url].  Please look for a follow-up email in early April notifying you of specific dates and detailed information.



If you have any concerns or technical inquiries, please contact the USPS Internet Customer Care Center via email at [email protected] or phone 1-800-344-7779.





Sincerely,



Patti Mason,

Manager, USPS.com

 

Does anybody know if this will have any effect on the existing version of this contribution?

 

Thanks

 

Chris

Link to comment
Share on other sites

  • 3 weeks later...
Hello all,

 

just received this message from USPS:

 

[snip]

 

Does anybody know if this will have any effect on the existing version of this contribution?

 

Thanks

 

Chris

 

Yes, it will. I am not certain of the exact effect, but I use this contribution in my store and will look into fixing it, as soon as USPS posts the revisions to the Rate V2 and International rate calculators. I'll also contact the USPS ICCC to determine if the documentation is already available somewhere. It hasn't made it to the webtools page yet.

 

--Glen

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...