• Resolved katenoknet

    (@katenoknet)


    Good afternoon.
    I can’t figure out the plugin. I realized that the delivery zones should be deleted, but I still don’t see USPS in the drop-down list.
    Tick – Enable this shipping method – set.

    The debugging code is here:

    array (
      'settings' => 
      array (
        'props' => 
        array (
          'endpoint' => 'https://secure.shippingapis.com/ShippingAPI.dll',
          'defaultUserId' => '891000005749',
          'domestic' => 
          array (
            0 => 'US',
            1 => 'PR',
            2 => 'VI',
            3 => 'MH',
            4 => 'FM',
          ),
          'services' => 
          array (
            'EXPRESS_MAIL' => 
            array (
              'name' => 'Priority Mail Express™',
              'services' => 
              array (
                3 => 'Priority Mail Express™',
                2 => 'Priority Mail Express™, Hold for Pickup',
                23 => 'Priority Mail Express™, Sunday/Holiday',
              ),
            ),
            'PRIORITY_MAIL' => 
            array (
              'name' => 'Priority Mail®',
              'services' => 
              array (
                1 => 'Priority Mail®',
                33 => 'Priority Mail®, Hold For Pickup',
                18 => 'Priority Mail® Keys and IDs',
                47 => 'Priority Mail® Regional Rate Box A',
                48 => 'Priority Mail® Regional Rate Box A, Hold For Pickup',
                49 => 'Priority Mail® Regional Rate Box B',
                50 => 'Priority Mail® Regional Rate Box B, Hold For Pickup',
              ),
            ),
            'FIRST_CLASS' => 
            array (
              'name' => 'First-Class Mail®',
              'services' => 
              array (
                '0A' => 'First-Class Mail® Postcards',
                '0B' => 'First-Class Mail® Letter',
                '0C' => 'First-Class Mail® Large Envelope',
                '0D' => 'First-Class Mail® Parcel',
                12 => 'First-Class™ Postcard Stamped',
                15 => 'First-Class™ Large Postcards',
                19 => 'First-Class™ Keys and IDs',
                61 => 'First-Class™ Package Service',
                53 => 'First-Class™ Package Service, Hold For Pickup',
                78 => 'First-Class Mail® Metered Letter',
              ),
            ),
            'STANDARD_POST' => 
            array (
              'name' => 'USPS Retail Ground™',
              'services' => 
              array (
                4 => 'USPS Retail Ground™',
              ),
            ),
            'MEDIA_MAIL' => 
            array (
              'name' => 'Media Mail',
              'services' => 
              array (
                6 => 'Media Mail',
              ),
            ),
            'LIBRARY_MAIL' => 
            array (
              'name' => 'Library Mail',
              'services' => 
              array (
                7 => 'Library Mail',
              ),
            ),
          ),
          'subservicesEnabled' => 
          array (
            3 => 'yes',
            2 => 'yes',
            23 => 'yes',
            1 => 'yes',
            33 => 'yes',
            18 => 'yes',
            47 => 'yes',
            48 => 'yes',
            49 => 'yes',
            50 => 'yes',
            '0A' => 'yes',
            '0B' => 'yes',
            '0C' => 'yes',
            '0D' => 'yes',
            12 => 'yes',
            15 => 'yes',
            19 => 'yes',
            61 => 'yes',
            53 => 'yes',
            78 => 'yes',
            4 => 'yes',
            6 => 'yes',
            7 => 'yes',
          ),
          'supports' => 
          array (
            0 => 'settings',
          ),
          'id' => 'usps_simple',
          'method_title' => 'USPS Simple',
          'method_description' => 'The <strong>USPS Simple</strong> plugin calculates rates for domestic shipping dynamically using USPS API during checkout.',
          'enabled' => 'yes',
          'title' => 'USPS Simple',
          'rates' => 
          array (
          ),
          'tax_status' => 'taxable',
          'fee' => NULL,
          'minimum_fee' => NULL,
          'instance_id' => 0,
          'instance_form_fields' => 
          array (
          ),
          'instance_settings' => 
          array (
          ),
          'availability' => NULL,
          'countries' => 
          array (
          ),
          'plugin_id' => 'woocommerce_',
          'errors' => 
          array (
          ),
          'data' => 
          array (
          ),
          'serviceDescription' => 'This controls the title which the customer sees during checkout.',
          'sender' => '22101-3841',
          'userId' => '524YOLOL4713',
          'commercialRate' => 'yes',
          'groupByWeight' => 'no',
          't_express_mail' => 'Priority Mail Express™',
          't_priority_mail' => 'Priority Mail®',
          't_first_class' => 'First-Class Mail® (USPS Simple)',
          't_standard_post' => 'USPS Retail Ground™ (USPS Simple)',
          't_media_mail' => 'Media Mail (USPS Simple)',
          't_library_mail' => 'Library Mail (USPS Simple)',
        ),
        'settings' => 
        array (
          'enabled' => 'yes',
          'sender' => '22101-3841',
          'user_id' => '524YOLOL4713',
          'commercial_rate' => 'yes',
          'group_by_weight' => 'no',
          'express_mail' => '',
          't_express_mail' => 'Priority Mail Express™',
          'express_mail_3' => 'yes',
          'express_mail_2' => 'yes',
          'express_mail_23' => 'yes',
          'priority_mail' => '',
          't_priority_mail' => 'Priority Mail®',
          'priority_mail_1' => 'yes',
          'priority_mail_33' => 'yes',
          'priority_mail_18' => 'yes',
          'priority_mail_47' => 'yes',
          'priority_mail_48' => 'yes',
          'priority_mail_49' => 'yes',
          'priority_mail_50' => 'yes',
          'first_class' => '',
          't_first_class' => '',
          'first_class_0A' => 'yes',
          'first_class_0B' => 'yes',
          'first_class_0C' => 'yes',
          'first_class_0D' => 'yes',
          'first_class_12' => 'yes',
          'first_class_15' => 'yes',
          'first_class_19' => 'yes',
          'first_class_61' => 'yes',
          'first_class_53' => 'yes',
          'first_class_78' => 'yes',
          'standard_post' => '',
          't_standard_post' => '',
          'standard_post_4' => 'yes',
          'media_mail' => '',
          't_media_mail' => '',
          'media_mail_6' => 'yes',
          'library_mail' => '',
          't_library_mail' => '',
          'library_mail_7' => 'yes',
        ),
      ),
      'package' => 
      array (
        'contents' => 
        array (
          'ef862a59a5728e21170530ebcfb17ef4' => 
          array (
            'key' => 'ef862a59a5728e21170530ebcfb17ef4',
            'product_id' => 18756,
            'variation_id' => 0,
            'variation' => 
            array (
            ),
            'quantity' => 1,
            'data_hash' => 'b5c1d5ca8bae6d4896cf1807cdf763f0',
            'line_tax_data' => 
            array (
              'subtotal' => 
              array (
              ),
              'total' => 
              array (
              ),
            ),
            'line_subtotal' => 2.0,
            'line_subtotal_tax' => 0,
            'line_total' => 2.0,
            'line_tax' => 0,
            'product' => 
            array (
              'name' => 'Transfer foil color pattern 4cm x 1m 242',
              'slug' => 'transfer-foil-color-pattern-4cm-x-1m-242',
              'price' => '2',
              'regular_price' => '2',
              'sale_price' => '',
              'weight' => '0.1 lbs',
              'weight_lbs' => 0.1,
              'dimensions' => '1 x 1 x  in',
              'dimensions_in' => '1 x 1 x ',
            ),
          ),
        ),
        'contents_cost' => 2.0,
        'applied_coupons' => 
        array (
        ),
        'user' => 
        array (
          'ID' => 1,
        ),
        'destination' => 
        array (
          'country' => 'US',
          'state' => 'NY',
          'postcode' => '11221',
          'city' => 'Ctate',
          'address' => 'VA 190350',
          'address_1' => 'VA 190350',
          'address_2' => '',
        ),
        'cart_subtotal' => '2',
        'rates' => 
        array (
          'flat_rate:11' => 
          WC_Shipping_Rate::__set_state(array(
             'data' => 
            array (
              'id' => 'flat_rate:11',
              'method_id' => 'flat_rate',
              'instance_id' => 11,
              'label' => 'Flat rate',
              'cost' => '8.95',
              'taxes' => 
              array (
              ),
            ),
             'meta_data' => 
            array (
              'Items' => 'Transfer foil color pattern 4cm x 1m 242 × 1',
            ),
          )),
        ),
      ),
      'requests' => 
      array (
        'ONLINE' => 'API=RateV4&XML=
    <RateV4Request USERID="524YOLOL4713">
        <Revision>2</Revision>
        <Package ID="ef862a59a5728e21170530ebcfb17ef4:1:1:1::0.1">
            <Service>ONLINE</Service>
            <ZipOrigination>22101-3841</ZipOrigination>
            <ZipDestination>11221</ZipDestination>
            <Pounds>0</Pounds>
            <Ounces>1.60</Ounces>
            <Container/>
            <Size>REGULAR</Size>
            <Width>1</Width>
            <Length>1</Length>
            <Height/>
            <Girth>2</Girth>
            <Machinable>true</Machinable>
            <ShipDate>08-Nov-2021</ShipDate>
        </Package>
    </RateV4Request>
    ',
        'STANDARD POST' => 'API=RateV4&XML=
    <RateV4Request USERID="524YOLOL4713">
        <Revision>2</Revision>
        <Package ID="ef862a59a5728e21170530ebcfb17ef4:1:1:1::0.1">
            <Service>STANDARD POST</Service>
            <ZipOrigination>22101-3841</ZipOrigination>
            <ZipDestination>11221</ZipDestination>
            <Pounds>0</Pounds>
            <Ounces>1.60</Ounces>
            <Container/>
            <Size>REGULAR</Size>
            <Width>1</Width>
            <Length>1</Length>
            <Height/>
            <Girth>2</Girth>
            <GroundOnly>true</GroundOnly>
            <Machinable>true</Machinable>
            <ShipDate>08-Nov-2021</ShipDate>
        </Package>
    </RateV4Request>
    ',
      ),
      'responses' => 
      array (
        'ONLINE' => 
        array (
          'headers' => 
          Requests_Utility_CaseInsensitiveDictionary::__set_state(array(
             'data' => 
            array (
              'x-backside-transport' => 'OK OK',
              'cache-control' => 'private',
              'content-type' => 'text/xml',
              'server' => 'Microsoft-IIS/10.0',
              'x-aspnet-version' => '4.0.30319',
              'x-powered-by' => 'ASP.NET',
              'date' => 'Sun, 07 Nov 2021 20:29:09 GMT',
              'x-global-transaction-id' => '8ac205fb61883728d6bc85fd',
              'access-control-allow-origin' => '*',
              'ntcoent-length' => '333',
              'strict-transport-security' => 'max-age=31536000; includeSubDomains',
              'x-frame-options' => 'SAMEORIGIN',
              'content-encoding' => 'gzip',
              'content-length' => '260',
            ),
          )),
          'body' => '<?xml version="1.0" encoding="UTF-8"?>
    <RateV4Response>
        <Package ID="ef862a59a5728e21170530ebcfb17ef4:1:1:1::0.1">
            <Error>
                <Number>-2147219498</Number>
                <Source>RateEngineV4;RateV4.ProcessRequest</Source>
                <Description>Please enter a valid ZIP Code for the sender.  </Description>
                <HelpFile/>
                <HelpContext/>
            </Error>
        </Package>
    </RateV4Response>
    ',
          'response' => 
          array (
            'code' => 200,
            'message' => 'OK',
          ),
          'cookies' => 
          array (
          ),
          'filename' => NULL,
        ),
        'STANDARD POST' => 
        array (
          'headers' => 
          Requests_Utility_CaseInsensitiveDictionary::__set_state(array(
             'data' => 
            array (
              'x-backside-transport' => 'OK OK',
              'cache-control' => 'private',
              'content-type' => 'text/xml',
              'server' => 'Microsoft-IIS/10.0',
              'x-aspnet-version' => '4.0.30319',
              'x-powered-by' => 'ASP.NET',
              'date' => 'Sun, 07 Nov 2021 20:29:34 GMT',
              'x-global-transaction-id' => 'e41d61746188372823517e1f',
              'access-control-allow-origin' => '*',
              'ntcoent-length' => '333',
              'strict-transport-security' => 'max-age=31536000; includeSubDomains',
              'x-frame-options' => 'SAMEORIGIN',
              'content-encoding' => 'gzip',
              'content-length' => '260',
            ),
          )),
          'body' => '<?xml version="1.0" encoding="UTF-8"?>
    <RateV4Response>
        <Package ID="ef862a59a5728e21170530ebcfb17ef4:1:1:1::0.1">
            <Error>
                <Number>-2147219498</Number>
                <Source>RateEngineV4;RateV4.ProcessRequest</Source>
                <Description>Please enter a valid ZIP Code for the sender.  </Description>
                <HelpFile/>
                <HelpContext/>
            </Error>
        </Package>
    </RateV4Response>
    ',
          'response' => 
          array (
            'code' => 200,
            'message' => 'OK',
          ),
          'cookies' => 
          array (
          ),
          'filename' => NULL,
        ),
      ),
      'unitedResponse' => '<?xml version="1.0" encoding="UTF-8"?>
    <RateV4Response>
        <Package ID="ef862a59a5728e21170530ebcfb17ef4:1:1:1::0.1">
            <Error>
                <Number>-2147219498</Number>
                <Source>RateEngineV4;RateV4.ProcessRequest</Source>
                <Description>Please enter a valid ZIP Code for the sender.  </Description>
                <HelpFile/>
                <HelpContext/>
            </Error>
        </Package>
    </RateV4Response>
    ',
      'shownRates' => 
      array (
      ),
      'eliminatedRates' => 
      array (
      ),
    )

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Dan

    (@dangoodman)

    Hello,

    The USPS response is the following error:
    “Please enter a valid ZIP Code for the sender.”

    It means the USPS API doesn’t accept ‘22101-3841’ as a valid zipcode. Setting it to 22101 should help.

    Thread Starter katenoknet

    (@katenoknet)

    Thxs))

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘THE PLUGIN DOES NOT WORK’ is closed to new replies.