Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Is USPS Down? I'm running what I think is API4 ... have a look?


FixItPete

Recommended Posts

Is there something wrong with USPS?

Here's my usps.php (the forum wouldn't let me post the whole thing... so here's part of it that mentions v4):

<?php  

/*

$Id: usps.php 5.2.1 - 2.2. RC2a  and 2.3 compatible; php 5.3 compatible

+++++ Original contribution by Brad Waite and Fritz Clapp ++++

++++ Revisions and Modifications made by Greg Deeth, 2008 ++++

Copyright 2008 osCommerce

Released under the GNU General Public License

//VERSION: 5.2.1 Updated to July 28 2013 Changes

*/



/////////////////////////////////////////

////////// Sets up USPS Class ///////////

/////////////////////////////////////////



class usps

{



    /////////////////////////////////////////

    ///////////// Sets Variables ////////////

    /////////////////////////////////////////

    

    var $code, $title, $description, $icon, $enabled, $countries;

    

    function usps()

        {

        if ( !function_exists('htmlspecialchars_decode') )

        {

          function htmlspecialchars_decode($text)

          {

             return strtr($text, array_flip(get_html_translation_table(HTML_SPECIALCHARS)));

           }

        }

        global $order;

        $this->code = 'usps';
.
.
.
.
.
.
.

                    break;

                    case 'Priority Commercial': $transreq[$transid] = 'API=PriorityMail&XML=' .

                        urlencode( '<PriorityMailRequest ' . $transitreq . '</PriorityMailRequest>');

                    break;

                    default:    $transreq[$transid] = '';

                    break;

                    }

                }

        

                /////////////////////////////////////////

                //////// END USPS TRANSIT REQUEST ///////

                /////////////////////////////////////////



            $services_count++;

            }



            /////////////////////////////////////////

            ////// END IF WITHIN ALLOWED LIST ///////

            /////////////////////////////////////////



        $request .= '</RateV4Request>';

        $request =     'API=RateV4&XML=' . urlencode($request);

        }

        

        /////////////////////////////////////////

        /////// END USPS DOMESTIC REQUEST ///////

        /////////////////////////////////////////



         else

    

        /////////////////////////////////////////

        //// START USPS INTERNATIONAL REQUEST ///

        /////////////////////////////////////////

        

        {

        $request =     '<IntlRateV2Request USERID="' . $Authentication[0] . '">' .

                    '<Revision>2</Revision>' .

                    '<Package ID="0">' .

                    '<Pounds>' . $this->pounds . '</Pounds>' .

                    '<Ounces>' . $this->ounces . '</Ounces>' .

                    '<Machinable>True</Machinable>' .

                    '<MailType>All</MailType>' .

                    '<GXG>' .

                        '<POBoxFlag>N</POBoxFlag>' .




Something I need to do?  Please help. :)

Thanks!

I find the fun in everything.

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