Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

USPS Requiring SSL for transactions


ScottB1

Recommended Posts

I got an email from USPS (below). What changes need to made? I am assuming that usps.php will need to be altered? I am assuming around line 212:

 

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

 

Sorry if this has been brought up. I really did search first.

 

Dear USPS Web Tools Customer,

 

 

 

Subject: Important ? Action Required! Secure Sockets Layer (SSL) Implemented for Web Tool APIs

 

 

 

As of September 30, 2006, you will be required to communicate via https://, instead of http://, for a total of 46 USPS Web Tools APIs. This change will also require you to change the Web Tools server called from production.shippingapis.com to secure.shippingapis.com.

 

 

 

After September 30, 2006, the http:// instances of impacted APIs shall no longer be accessible.

 

 

 

Please be advised the list of APIs impacted, as detailed in table below, are currently accessible under SSL and therefore you can begin calling these new instances immediately. Your User ID and the API names are the same.

 

 

 

The USPS has implemented such changes to secure your personally-identifiable information (PII) data transmitted over the Internet. Technical user guides available via: http://www.usps.com/webtools/technical.htm have been updated and denote proper URL prefixes.

 

 

 

Impacted APIs:

 

 

 

API

 

 

Name

 

CarrierPickupAvailability

 

 

Carrier Pickup Availability

 

CarrierPickupCancel

 

 

Carrier Pickup Cancel

 

CarrierPickupChange

 

 

Carrier Pickup Change

 

CarrierPickupInquiry

 

 

Carrier Pickup Inquiry

 

CarrierPickupSchedule

 

 

Carrier Pickup Schedule

 

Courtesy

 

 

Courtesy Reply Mail Label

 

CustomsCN22

 

 

International Customs Form CN 22

 

CustomsCN22Certify

 

 

International Customs Form CN 22 Certification

 

CustomsCN22V2

 

 

International Customs Form CN 22 V2

 

CustomsCN22V2Certify

 

 

International Customs Form CN 22 V2 Certification

 

CustomsCP72V2

 

 

International Customs Form CP72 V2

 

CustomsCP72V2Certify

 

 

International Customs Form CP72 V2 Certification

 

CustomsCP72V3

 

 

International Customs Form CP72 V3

 

CustomsCP72V3Certify

 

 

International Customs Form CP72 V3 Certification/Test

 

DelivConfirmCertify

 

 

Delivery Confirmation Certification

 

DelivConfirmCertifyV3

 

 

Delivery Confirmation Certification V3.0

 

DelivConfirmPICCertify

 

 

Delivery Confirmation Barcode Only Certification

 

DelivConfirmPICCertifyV3

 

 

Delivery Confirmation PIC Certification V3.0

 

DeliveryConfirmationPICV2

 

 

Delivery Confirmation Barcode Only V2.0

 

DeliveryConfirmationPICV3

 

 

Delivery Confirmation Barcode Only V3.0

 

DeliveryConfirmationV2

 

 

Delivery Confirmation V2.0

 

DeliveryConfirmationV3

 

 

Delivery Confirmation V3.0

 

EMR_DC_ProductionV2

 

 

EMR with Delivery Confirmation V2.0

 

EMR_DC_ProductionV3

 

 

EMR with Delivery Confirmation V3.0

 

ExpressMailLabel

 

 

Express Mail Label

 

ExpressMailLabelCertify

 

 

Express Mail Label Certification

 

GlobalExpressMailLabelV2

 

 

Global Express Mail V2

 

GlobalExpressMailLabelV2Certify

 

 

Global Express Mail V2 Certification

 

GlobalLabelAirmail

 

 

Global Label Airmail

 

GlobalLabelAirmailCertify

 

 

Global Label Airmail Certification

 

GlobalLabelExpress

 

 

Global Label Express

 

GlobalLabelExpressCertify

 

 

Global Label Express Certification

 

GlobalLabelPriority

 

 

Global Label Priority

 

GlobalLabelPriorityCertify

 

 

Global Label Priority Certification

 

MerchandiseReturnV2

 

 

Merchandise Return V2.0

 

MerchandiseReturnV3

 

 

Merchandise Return V3.0

 

MerchReturnCertify

 

 

EMR with Delivery Confirmation Certification

 

MerchReturnCertifyV3

 

 

EMR with Delivery Confirmation Certification V3.0

 

SignatureConfirmation

 

 

Signature Confirmation

 

SignatureConfirmationCertify

 

 

Signature Confirmation Certify

 

SignatureConfirmationCertifyV3

 

 

Signature Confirmation Certify V3.0

 

SignatureConfirmationPIC

 

Signature Confirmation Barcode Only

 

SignatureConfirmationPICCertify

 

Signature Confirmation PIC Certify

 

SignatureConfirmationPICCertifyV3

 

Signature Confirmation Certify Barcode Only V3.0

 

SignatureConfirmationPICV3

 

Signature Confirmation Barcode Only V3.0

 

SignatureConfirmationV3

 

Signature Confirmation V3.0

 

In summary, the implementation of SSL in Web Tools will require you to alter your code for aforementioned APIs to call URL:

 

- https://secure.shippingapis.com, instead of http://production.shippingapis.com

 

Please note that the XML schema will not change as a result of this effort.

 

You are strongly encouraged to alter your software to accommodate these changes as soon as possible.

 

Thank you in advance for your cooperation and understanding as these changes are implemented. If you have any additional concerns or technical inquiries, please contact the USPS Internet Customer Care Center via email at [email protected] or phone at 1-800-344-7779.

Thank you,

Patti Mason

Manager USPS.com

Link to comment
Share on other sites

I too am needing to make this change. I assume that bott 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

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