Forums / Addon Shipping Modules / USPS Shipping (RESTful) (USPSr)

USPS Shipping (RESTful) (USPSr)

Sticky

Views: 54,962

Results 101 to 120 of 558
23 Apr 2025, 3:11 PM
#101
retched avatar

retched

Totally Zenned

Join Date:
Jun 2007
Location:
Bronx, New York, United States
Posts:
949
Plugin Contributions:
3

USPS Shipping (RESTful) (USPSr)

carlwhat:

never modify core code when you do not have to.

try and play along.

create an auto-loading observer. also this post.

that you want to observer this notifier.

if you have successfully gotten that far, you can then add your code as follows:

public function updateNotifyShippingUspsUpdateStatus(&$class)
{
$chk_cart = 0;
$chk_cart += $_SESSION['cart']->in_cart_check('master_categories_id', '4854');
$chk_cart += $_SESSION['cart']->in_cart_check('products_id', '4');
if ($chk_cart > 0) {
$class->enabled = false;
}
}

> 
> best.

^^ Effectively this. Because by modifying my core code, you'll just have the work erased when a new version comes out (right now working on getting First Class Mail Letter to work).

You can do this by targeting the  NOTIFY_SHIPPING_USPS_CHECK_CART notifier on line 352 and having the $contents_ok variable return (boolean) false. This will in effect disable the module if triggered. I can probably write up an observer class sometime later after some testing.
23 Apr 2025, 4:31 PM
#102
n8pbm avatar

n8pbm

Zen Follower

Join Date:
Mar 2005
Posts:
142
Plugin Contributions:
0

Re: USPS Shipping (RESTful) (USPSr)

Thanks, I am not a programmer so I will have to dig into this. I understand the basics but not sure how to implement it yet.

If you can provide an observer class file that I can use then that would be great.

Thank you

24 Apr 2025, 12:11 PM
#103
n8pbm avatar

n8pbm

Zen Follower

Join Date:
Mar 2005
Posts:
142
Plugin Contributions:
0

Re: USPS Shipping (RESTful) (USPSr)

I managed to get this working. Thank you for the tips. It is a much better solution.

24 Apr 2025, 4:44 PM
#104
retched avatar

retched

Totally Zenned

Join Date:
Jun 2007
Location:
Bronx, New York, United States
Posts:
949
Plugin Contributions:
3

Re: USPS Shipping (RESTful) (USPSr)

n8pbm:

I managed to get this working. Thank you for the tips. It is a much better solution.

Congrats. There is like a 5% chance somewhere down the line I might add this as an option like I did with the original Media Mail disabler. I just fear that I'm making the options screen a bit too long. At this rate, I might have to consider a different layout. Additionally, I'll add in a sample observer class next run through

29 Apr 2025, 11:26 AM
#105
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,720
Plugin Contributions:
56

Re: USPS Shipping (RESTful) (USPSr)

International shipping oddity: when I'm shipping a 4 pound package to Canada, I get both Priority Mail International and Priority Mail Express International as options, but if I ship an 8 pound package, my only option is Priority Mail Express International.

I notice flat rate options stop at 4 pounds for International, but ship by weight goes to 70. Is there an API setting that needs adjusting?

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

29 Apr 2025, 11:35 AM
#106
retched avatar

retched

Totally Zenned

Join Date:
Jun 2007
Location:
Bronx, New York, United States
Posts:
949
Plugin Contributions:
3

Re: USPS Shipping (RESTful) (USPSr)

swguy:

International shipping oddity: when I'm shipping a 4 pound package to Canada, I get both Priority Mail International and Priority Mail Express International as options, but if I ship an 8 pound package, my only option is Priority Mail Express International.

I notice flat rate options stop at 4 pounds for International, but ship by weight goes to 70. Is there an API setting that needs adjusting?

That is odd. I can see the API return "Priority Mail International Machinable ISC Single-piece" in both of those but not sure why the script isn't pulling both. Can you generate a log?

29 Apr 2025, 11:42 AM
#107
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,720
Plugin Contributions:
56

Re: USPS Shipping (RESTful) (USPSr)

I have both logs that I will email you.

One possible clue: if you turn off insurance, you get regular Priority Mail International.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

29 Apr 2025, 12:14 PM
#108
retched avatar

retched

Totally Zenned

Join Date:
Jun 2007
Location:
Bronx, New York, United States
Posts:
949
Plugin Contributions:
3

Re: USPS Shipping (RESTful) (USPSr)

swguy:

I have both logs that I will email you.

One possible clue: if you turn off insurance, you get regular Priority Mail International.

Yup that is a limitation of the USPS API. It will not return services if it doesn't receive a valid config. In this case, setting the value of the order at (I think) $675 for Canada bound shipments will cause it to not return certain shipping methods.

7 Jun 2025, 4:48 PM
#109
njcyx avatar

njcyx

Zen Follower

Join Date:
Apr 2019
Posts:
374
Plugin Contributions:
0

Re: USPS Shipping (RESTful) (USPSr)

zc 210, php 8.2

Anyone feels that this plug-in is very slow? Under the OPC guest checkout page, after I enabled this USPSr plug-in, every time when I change the shipping method OR payment method, it will cycle/load for about 4s. If I disable this USPSr plug-in, it will be reduced to about 0.5s (normal). I tried both encapsulated and non-encapsulated USPSr, no difference.

My testing site enabled OPC 2.5.4, UPSrest 1.3.7, FedExrest 1.3.4 and localsalestax 3.0.1. I disabled the plug-in one by one and I narrowed the issue down to the USPSr.

7 Jun 2025, 5:12 PM
#110
retched avatar

retched

Totally Zenned

Join Date:
Jun 2007
Location:
Bronx, New York, United States
Posts:
949
Plugin Contributions:
3

Re: USPS Shipping (RESTful) (USPSr)

njcyx:

zc 210, php 8.2

Anyone feels that this plug-in is very slow? Under the OPC guest checkout page, after I enabled this USPSr plug-in, every time when I change the shipping method OR payment method, it will cycle/load for about 4s. If I disable this USPSr plug-in, it will be reduced to about 0.5s (normal). I tried both encapsulated and non-encapsulated USPSr, no difference.

My testing site enabled OPC 2.5.4, UPSrest 1.3.7, FedExrest 1.3.4 and localsalestax 3.0.1. I disabled the plug-in one by one and I narrowed the issue down to the USPSr.

Possibly because it's doing a full pull of the rates on each step. If you head back to shipping confirm and change the method, it does a full processing and pull of the rates. If you go back to change your payment method, it still does another full pull or all the rates with another call to the USPS server.

I suppose I can try to make a cache of sorts but right now it can't be helped.

I have also found a similar slow down.

7 Jun 2025, 5:21 PM
#111
njcyx avatar

njcyx

Zen Follower

Join Date:
Apr 2019
Posts:
374
Plugin Contributions:
0

Re: USPS Shipping (RESTful) (USPSr)

retched:

Possibly because it's doing a full pull of the rates on each step. If you head back to shipping confirm and change the method, it does a full processing and pull of the rates. If you go back to change your payment method, it still does another full pull or all the rates with another call to the USPS server.

I suppose I can try to make a cache of sorts but right now it can't be helped.

I have also found a similar slow down.

Thanks for your reply. If I'm right, the early version of OPC also has this type of issue. So every time when I changed the selection, it will get a new quote, which will slow down the page. However, the newer/current OPC has solved this issue, at least there is almost no delay for UPS and fedex now.

Hopefully it will give you some ideas. Anyway, the old USPS plug-in still works for now.

7 Jun 2025, 7:49 PM
#112
retched avatar

retched

Totally Zenned

Join Date:
Jun 2007
Location:
Bronx, New York, United States
Posts:
949
Plugin Contributions:
3

Re: USPS Shipping (RESTful) (USPSr)

I have to figure out what the module is doing between the new USPS and the OPC friendly one in that case. I'm willing to bet it's something small that I overlooked between the two.

11 Jun 2025, 12:31 AM
#113
marcopolo avatar

marcopolo

Totally Zenned

Join Date:
May 2008
Location:
United States
Posts:
522
Plugin Contributions:
2

Re: USPS Shipping (RESTful) (USPSr)

For anyone needing USPSRestful 1.2.0 on PHP 5.6, I converted it for an older Zen Cart site I'm upgrading to 2.1.0. This ensures it works before the USPS cutoff if the upgrade isn't complete. [Attachment no longer available]

marcopolo
Zen Cart 2.2.2 | PHP 8.5.11 | MariaDB 10.11.14

9 Aug 2025, 11:04 PM
#114
jimmie avatar

jimmie

Totally Zenned

Join Date:
Jan 2013
Location:
New Port Richey, Florida
Posts:
971
Plugin Contributions:
0

Re: USPS Shipping (RESTful) (USPSr)

zen version 2.10
not pulling quotes from usps
this is log file

2025-08-09 22:22:23: 
Requesting Token from USPS
Token Request
{
    "grant_type": "client_credentials",
    "client_id": "hidden",
    "scope": "domestic-prices addresses international-prices service-standards shipments"
}

2025-08-09 22:22:23: 
==================================

TOKEN RESPONSE FROM USPS:

{
    "access_token": "eyJraWQiOiJIdWpzX2F6UnFJUzBpSE5YNEZIRk96eUwwdjE4RXJMdjNyZDBoalpNUnJFIiwidHlwIjoiSldUIiwiYWxnIjoiUlMyNTYifQ.eyJlbnRpdGxlbWVudHMiOltdLCJzdWIiOiI1NDAyOTQ0OSIsImNyaWQiOiI4NzU5MTI2Iiwic3ViX2lkIjoiNTQwMjk0NDkiLCJyb2xlcyI6W10sInBheW1lbnRfYWNjb3VudHMiOnsiYWNjb3VudHMiOiIiLCJwZXJtaXRzIjpbeyJwZXJtaXROdW1iZXIiOiJbXSIsInBlcm1pdFpJUCI6IjAwMCJ9XX0sImlzcyI6Imh0dHBzOi8va2V5Yy51c3BzLmNvbS9yZWFsbXMvVVNQUyIsImNvbnRyYWN0cyI6eyJwYXltZW50QWNjb3VudHMiOnsiYWNjb3VudHMiOiIifSwicGVybWl0cyI6W3sicGVybWl0TnVtYmVyIjoiW10iLCJwZXJtaXRaSVAiOiIwMDAifV19LCJhdWQiOlsicGF5bWVudHMiLCJwcmljZXMiLCJzdWJzY3JpcHRpb25zLXRyYWNraW5nIiwib3JnYW5pemF0aW9ucyJdLCJhenAiOiJTWENXRHREQ2I0blBCM0JXclhsUVlLMjFLWWRuZzB0aHFRVUpjd0FyNjlTcXRVVnciLCJtYWlsX293bmVycyI6W3siY3JpZCI6Ijg3NTkxMjYiLCJtaWRzIjoiIn1dLCJzY29wZSI6ImRvbWVzdGljLXByaWNlcyAgb2F1dGgyLW9pZGMgYWRkcmVzc2VzIGludGVybmF0aW9uYWwtcHJpY2VzICB1c3BzOnBheW1lbnRfbWV0aG9kcyBvcGVuaWQgc2VydmljZS1zdGFuZGFyZHMtZmlsZXMgc2VydmljZS1zdGFuZGFyZHMgbG9jYXRpb25zICB1c3BzOk1JRHMgc2hpcG1lbnRzIiwiY29tcGFueV9uYW1lIjoiSk5TIEZsb29yaW5nICYgU3VwcGxpZXMiLCJleHAiOjE3NTQ4MDY5NDMsImlhdCI6MTc1NDc3ODE0MywianRpIjoiNTRjYThkMWQtNjhmNS00OTViLWFkMjYtY2UxYzUxM2JjZTBiIn0.F-VJr3YmDUG3F1w2esbT-4Bu6yB8UgS-J599hXc4CB_ZXXMWRF-D5u-AOWRzhSaN24WjehQVrzwe6B-vFbK9cENvSoBF5P86giDJX5HhqNfC4j-tS_HM-Xh_h_fVqKuCvGic_8-qZVApg4xP698iYjPVNB5QyytudHGtnmz9FodnuYmD2ol3pbAHlSVoDkgo5DIyWkh_3EOonsjZQOr6OkwWb55K2WmgyfItkVVdkdN0GWimXhbQx2B4OB7VykAD3Be5f_3g6pHuLzpzLdfd5KClOFgoJQF6l3g3KDf8zNcx8ZSPSELcEOESlatPWDjfctYPEiz-XJV4aES7syAnkQ",
    "token_type": "Bearer",
    "issued_at": 1754778143886,
    "expires_in": 28799,
    "status": "approved",
    "scope": "domestic-prices  oauth2-oidc addresses international-prices  usps:payment_methods openid service-standards-files service-standards locations  usps:MIDs shipments",
    "issuer": "https:\/\/keyc.usps.com\/realms\/USPS",
    "client_id": "hidden",
    "application_name": "JNS Ship USPS",
    "api_products": "[Public Access I]",
    "public_key": "LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUlJQklqQU5CZ2txaGtpRzl3MEJBUUVGQUFPQ0FROEFNSUlCQ2dLQ0FRRUF1UjQzS0hRdm44UlYybWplMEczSAptKzI3dnA4ZFh4U25oQTVrSk5VbFVJTmZaYnBtZGR6VWpaV1RRMHU0SWdMaTQ5ZDJlTTR1TVE2NjFNdmNyUE5ZCktvRXBWRkNldzJ5QmhqUjJ0T3A5V0gwODgxQ0x3RWdTY3p6YU4vNDAxQ3BSSXlVTjh1aHVuV29ydzZSdkI2S0oKY1NRaFUyMkVrZ0hpZ3ZJTVpDWGt2dmlaa1ByeWI1cTJIcGtMNjVCcFdBRHBYSklpMGJFaXdFU1RSbm9qdkdZSAp3TXJvOCtwVGdmNEN1ZXdpbTdFaDluNm1nbmZnTWp5MUprcjZVVTUzWU1ZdWRrZzB0NHBUb1QvZWd0MHJjZCtwCjJURk82NG9uU21XRDlyWXh1Q0xwYVcwTG1GVGoyYUpTOUt3TnhHb2pIakV5TjhIVG5zd1lOKzdQNVlLVmxobHUKL1FJREFRQUIKLS0tLS1FTkQgUFVCTElDIEtFWS0tLS0t"
}


---------------------------------
CommErr (should be 0): 0 - 

==================================



2025-08-09 22:22:23: Revoking a Token from USPS
Revocation Request
{
    "client_id": "hidden",
    "revoke_token": "eyJraWQiOiJIdWpzX2F6UnFJUzBpSE5YNEZIRk96eUwwdjE4RXJMdjNyZDBoalpNUnJFIiwidHlwIjoiSldUIiwiYWxnIjoiUlMyNTYifQ.eyJlbnRpdGxlbWVudHMiOltdLCJzdWIiOiI1NDAyOTQ0OSIsImNyaWQiOiI4NzU5MTI2Iiwic3ViX2lkIjoiNTQwMjk0NDkiLCJyb2xlcyI6W10sInBheW1lbnRfYWNjb3VudHMiOnsiYWNjb3VudHMiOiIiLCJwZXJtaXRzIjpbeyJwZXJtaXROdW1iZXIiOiJbXSIsInBlcm1pdFpJUCI6IjAwMCJ9XX0sImlzcyI6Imh0dHBzOi8va2V5Yy51c3BzLmNvbS9yZWFsbXMvVVNQUyIsImNvbnRyYWN0cyI6eyJwYXltZW50QWNjb3VudHMiOnsiYWNjb3VudHMiOiIifSwicGVybWl0cyI6W3sicGVybWl0TnVtYmVyIjoiW10iLCJwZXJtaXRaSVAiOiIwMDAifV19LCJhdWQiOlsicGF5bWVudHMiLCJwcmljZXMiLCJzdWJzY3JpcHRpb25zLXRyYWNraW5nIiwib3JnYW5pemF0aW9ucyJdLCJhenAiOiJTWENXRHREQ2I0blBCM0JXclhsUVlLMjFLWWRuZzB0aHFRVUpjd0FyNjlTcXRVVnciLCJtYWlsX293bmVycyI6W3siY3JpZCI6Ijg3NTkxMjYiLCJtaWRzIjoiIn1dLCJzY29wZSI6ImRvbWVzdGljLXByaWNlcyAgb2F1dGgyLW9pZGMgYWRkcmVzc2VzIGludGVybmF0aW9uYWwtcHJpY2VzICB1c3BzOnBheW1lbnRfbWV0aG9kcyBvcGVuaWQgc2VydmljZS1zdGFuZGFyZHMtZmlsZXMgc2VydmljZS1zdGFuZGFyZHMgbG9jYXRpb25zICB1c3BzOk1JRHMgc2hpcG1lbnRzIiwiY29tcGFueV9uYW1lIjoiSk5TIEZsb29yaW5nICYgU3VwcGxpZXMiLCJleHAiOjE3NTQ4MDY5NDMsImlhdCI6MTc1NDc3ODE0MywianRpIjoiNTRjYThkMWQtNjhmNS00OTViLWFkMjYtY2UxYzUxM2JjZTBiIn0.F-VJr3YmDUG3F1w2esbT-4Bu6yB8UgS-J599hXc4CB_ZXXMWRF-D5u-AOWRzhSaN24WjehQVrzwe6B-vFbK9cENvSoBF5P86giDJX5HhqNfC4j-tS_HM-Xh_h_fVqKuCvGic_8-qZVApg4xP698iYjPVNB5QyytudHGtnmz9FodnuYmD2ol3pbAHlSVoDkgo5DIyWkh_3EOonsjZQOr6OkwWb55K2WmgyfItkVVdkdN0GWimXhbQx2B4OB7VykAD3Be5f_3g6pHuLzpzLdfd5KClOFgoJQF6l3g3KDf8zNcx8ZSPSELcEOESlatPWDjfctYPEiz-XJV4aES7syAnkQ",
    "token_type": "access_token"
}

2025-08-09 22:22:24: 
==================================

TOKEN RESPONSE FROM USPS:

{
    "error": "invalid_request",
    "error_description": "invalid_access_token: Check the value of the access token. It may be missing, have expired or have been revoked.",
    "error_uri": "https:\/\/datatracker.ietf.org\/doc\/html\/rfc7009#section-2.2.1"
}


---------------------------------
CommErr (should be 0): 0 - 

==================================
9 Aug 2025, 11:14 PM
#115
retched avatar

retched

Totally Zenned

Join Date:
Jun 2007
Location:
Bronx, New York, United States
Posts:
949
Plugin Contributions:
3

Re: USPS Shipping (RESTful) (USPSr)

What is the client_id? Is it actually 'hidden' or is there an actual value? (Please don't obfuscate that. The client_key (the password component to your API credentials) isn't displayed.)

Also what option are selected for the module in the ZenCart admin area? This feels incomplete.

9 Aug 2025, 11:34 PM
#116
jimmie avatar

jimmie

Totally Zenned

Join Date:
Jan 2013
Location:
New Port Richey, Florida
Posts:
971
Plugin Contributions:
0

Re: USPS Shipping (RESTful) (USPSr)

2025-08-09 22:22:23: 
Requesting Token from USPS
Token Request
{
    "grant_type": "client_credentials",
    "client_id": "SXCWDtDCb4nPB3BWrXlQYK21KYdng0thqQUJcwAr69SqtUVw",
    "scope": "domestic-prices addresses international-prices service-standards shipments"
}

2025-08-09 22:22:23: 
==================================

TOKEN RESPONSE FROM USPS:

{
    "access_token": "eyJraWQiOiJIdWpzX2F6UnFJUzBpSE5YNEZIRk96eUwwdjE4RXJMdjNyZDBoalpNUnJFIiwidHlwIjoiSldUIiwiYWxnIjoiUlMyNTYifQ.eyJlbnRpdGxlbWVudHMiOltdLCJzdWIiOiI1NDAyOTQ0OSIsImNyaWQiOiI4NzU5MTI2Iiwic3ViX2lkIjoiNTQwMjk0NDkiLCJyb2xlcyI6W10sInBheW1lbnRfYWNjb3VudHMiOnsiYWNjb3VudHMiOiIiLCJwZXJtaXRzIjpbeyJwZXJtaXROdW1iZXIiOiJbXSIsInBlcm1pdFpJUCI6IjAwMCJ9XX0sImlzcyI6Imh0dHBzOi8va2V5Yy51c3BzLmNvbS9yZWFsbXMvVVNQUyIsImNvbnRyYWN0cyI6eyJwYXltZW50QWNjb3VudHMiOnsiYWNjb3VudHMiOiIifSwicGVybWl0cyI6W3sicGVybWl0TnVtYmVyIjoiW10iLCJwZXJtaXRaSVAiOiIwMDAifV19LCJhdWQiOlsicGF5bWVudHMiLCJwcmljZXMiLCJzdWJzY3JpcHRpb25zLXRyYWNraW5nIiwib3JnYW5pemF0aW9ucyJdLCJhenAiOiJTWENXRHREQ2I0blBCM0JXclhsUVlLMjFLWWRuZzB0aHFRVUpjd0FyNjlTcXRVVnciLCJtYWlsX293bmVycyI6W3siY3JpZCI6Ijg3NTkxMjYiLCJtaWRzIjoiIn1dLCJzY29wZSI6ImRvbWVzdGljLXByaWNlcyAgb2F1dGgyLW9pZGMgYWRkcmVzc2VzIGludGVybmF0aW9uYWwtcHJpY2VzICB1c3BzOnBheW1lbnRfbWV0aG9kcyBvcGVuaWQgc2VydmljZS1zdGFuZGFyZHMtZmlsZXMgc2VydmljZS1zdGFuZGFyZHMgbG9jYXRpb25zICB1c3BzOk1JRHMgc2hpcG1lbnRzIiwiY29tcGFueV9uYW1lIjoiSk5TIEZsb29yaW5nICYgU3VwcGxpZXMiLCJleHAiOjE3NTQ4MDY5NDMsImlhdCI6MTc1NDc3ODE0MywianRpIjoiNTRjYThkMWQtNjhmNS00OTViLWFkMjYtY2UxYzUxM2JjZTBiIn0.F-VJr3YmDUG3F1w2esbT-4Bu6yB8UgS-J599hXc4CB_ZXXMWRF-D5u-AOWRzhSaN24WjehQVrzwe6B-vFbK9cENvSoBF5P86giDJX5HhqNfC4j-tS_HM-Xh_h_fVqKuCvGic_8-qZVApg4xP698iYjPVNB5QyytudHGtnmz9FodnuYmD2ol3pbAHlSVoDkgo5DIyWkh_3EOonsjZQOr6OkwWb55K2WmgyfItkVVdkdN0GWimXhbQx2B4OB7VykAD3Be5f_3g6pHuLzpzLdfd5KClOFgoJQF6l3g3KDf8zNcx8ZSPSELcEOESlatPWDjfctYPEiz-XJV4aES7syAnkQ",
    "token_type": "Bearer",
    "issued_at": 1754778143886,
    "expires_in": 28799,
    "status": "approved",
    "scope": "domestic-prices  oauth2-oidc addresses international-prices  usps:payment_methods openid service-standards-files service-standards locations  usps:MIDs shipments",
    "issuer": "https:\/\/keyc.usps.com\/realms\/USPS",
    "client_id": "SXCWDtDCb4nPB3BWrXlQYK21KYdng0thqQUJcwAr69SqtUVw",
    "application_name": "JNS Ship USPS",
    "api_products": "[Public Access I]",
    "public_key": "LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUlJQklqQU5CZ2txaGtpRzl3MEJBUUVGQUFPQ0FROEFNSUlCQ2dLQ0FRRUF1UjQzS0hRdm44UlYybWplMEczSAptKzI3dnA4ZFh4U25oQTVrSk5VbFVJTmZaYnBtZGR6VWpaV1RRMHU0SWdMaTQ5ZDJlTTR1TVE2NjFNdmNyUE5ZCktvRXBWRkNldzJ5QmhqUjJ0T3A5V0gwODgxQ0x3RWdTY3p6YU4vNDAxQ3BSSXlVTjh1aHVuV29ydzZSdkI2S0oKY1NRaFUyMkVrZ0hpZ3ZJTVpDWGt2dmlaa1ByeWI1cTJIcGtMNjVCcFdBRHBYSklpMGJFaXdFU1RSbm9qdkdZSAp3TXJvOCtwVGdmNEN1ZXdpbTdFaDluNm1nbmZnTWp5MUprcjZVVTUzWU1ZdWRrZzB0NHBUb1QvZWd0MHJjZCtwCjJURk82NG9uU21XRDlyWXh1Q0xwYVcwTG1GVGoyYUpTOUt3TnhHb2pIakV5TjhIVG5zd1lOKzdQNVlLVmxobHUKL1FJREFRQUIKLS0tLS1FTkQgUFVCTElDIEtFWS0tLS0t"
}


---------------------------------
CommErr (should be 0): 0 - 

==================================



2025-08-09 22:22:23: Revoking a Token from USPS
Revocation Request
{
    "client_id": "SXCWDtDCb4nPB3BWrXlQYK21KYdng0thqQUJcwAr69SqtUVw",
    "revoke_token": "eyJraWQiOiJIdWpzX2F6UnFJUzBpSE5YNEZIRk96eUwwdjE4RXJMdjNyZDBoalpNUnJFIiwidHlwIjoiSldUIiwiYWxnIjoiUlMyNTYifQ.eyJlbnRpdGxlbWVudHMiOltdLCJzdWIiOiI1NDAyOTQ0OSIsImNyaWQiOiI4NzU5MTI2Iiwic3ViX2lkIjoiNTQwMjk0NDkiLCJyb2xlcyI6W10sInBheW1lbnRfYWNjb3VudHMiOnsiYWNjb3VudHMiOiIiLCJwZXJtaXRzIjpbeyJwZXJtaXROdW1iZXIiOiJbXSIsInBlcm1pdFpJUCI6IjAwMCJ9XX0sImlzcyI6Imh0dHBzOi8va2V5Yy51c3BzLmNvbS9yZWFsbXMvVVNQUyIsImNvbnRyYWN0cyI6eyJwYXltZW50QWNjb3VudHMiOnsiYWNjb3VudHMiOiIifSwicGVybWl0cyI6W3sicGVybWl0TnVtYmVyIjoiW10iLCJwZXJtaXRaSVAiOiIwMDAifV19LCJhdWQiOlsicGF5bWVudHMiLCJwcmljZXMiLCJzdWJzY3JpcHRpb25zLXRyYWNraW5nIiwib3JnYW5pemF0aW9ucyJdLCJhenAiOiJTWENXRHREQ2I0blBCM0JXclhsUVlLMjFLWWRuZzB0aHFRVUpjd0FyNjlTcXRVVnciLCJtYWlsX293bmVycyI6W3siY3JpZCI6Ijg3NTkxMjYiLCJtaWRzIjoiIn1dLCJzY29wZSI6ImRvbWVzdGljLXByaWNlcyAgb2F1dGgyLW9pZGMgYWRkcmVzc2VzIGludGVybmF0aW9uYWwtcHJpY2VzICB1c3BzOnBheW1lbnRfbWV0aG9kcyBvcGVuaWQgc2VydmljZS1zdGFuZGFyZHMtZmlsZXMgc2VydmljZS1zdGFuZGFyZHMgbG9jYXRpb25zICB1c3BzOk1JRHMgc2hpcG1lbnRzIiwiY29tcGFueV9uYW1lIjoiSk5TIEZsb29yaW5nICYgU3VwcGxpZXMiLCJleHAiOjE3NTQ4MDY5NDMsImlhdCI6MTc1NDc3ODE0MywianRpIjoiNTRjYThkMWQtNjhmNS00OTViLWFkMjYtY2UxYzUxM2JjZTBiIn0.F-VJr3YmDUG3F1w2esbT-4Bu6yB8UgS-J599hXc4CB_ZXXMWRF-D5u-AOWRzhSaN24WjehQVrzwe6B-vFbK9cENvSoBF5P86giDJX5HhqNfC4j-tS_HM-Xh_h_fVqKuCvGic_8-qZVApg4xP698iYjPVNB5QyytudHGtnmz9FodnuYmD2ol3pbAHlSVoDkgo5DIyWkh_3EOonsjZQOr6OkwWb55K2WmgyfItkVVdkdN0GWimXhbQx2B4OB7VykAD3Be5f_3g6pHuLzpzLdfd5KClOFgoJQF6l3g3KDf8zNcx8ZSPSELcEOESlatPWDjfctYPEiz-XJV4aES7syAnkQ",
    "token_type": "access_token"
}

2025-08-09 22:22:24: 
==================================

TOKEN RESPONSE FROM USPS:

{
    "error": "invalid_request",
    "error_description": "invalid_access_token: Check the value of the access token. It may be missing, have expired or have been revoked.",
    "error_uri": "https:\/\/datatracker.ietf.org\/doc\/html\/rfc7009#section-2.2.1"
}


---------------------------------
CommErr (should be 0): 0 - 

==================================
9 Aug 2025, 11:35 PM
#117
jimmie avatar

jimmie

Totally Zenned

Join Date:
Jan 2013
Location:
New Port Richey, Florida
Posts:
971
Plugin Contributions:
0

Re: USPS Shipping (RESTful) (USPSr)

i started checking them all
Shipping Methods (Domestic and International)
Domestic Methods:
Ground Advantage, Ground Advantage Cubic, Media, Connect Local DDU, Connect Local F/R Box, Connect Local Sm. F/R Bag, Connect Local Lg. F/R Bag, Priority, Priority Cubic, Priority F/R Env, Priority Pad. F/R Env, Priority Leg. F/R Env, Priority Sm. F/R Box, Priority Md. F/R Box, Priority Lg. F/R Box, Priority Lg. F/R Box APO/FPO/DPO, Priority Express, Priority Express F/R Env, Priority Express Pad. F/R Env, Priority Express Leg. F/R Env

9 Aug 2025, 11:37 PM
#118
jimmie avatar

jimmie

Totally Zenned

Join Date:
Jan 2013
Location:
New Port Richey, Florida
Posts:
971
Plugin Contributions:
0

Re: USPS Shipping (RESTful) (USPSr)

dont know if this has anything to do with post number 6

9 Aug 2025, 11:45 PM
#119
retched avatar

retched

Totally Zenned

Join Date:
Jun 2007
Location:
Bronx, New York, United States
Posts:
949
Plugin Contributions:
3

Re: USPS Shipping (RESTful) (USPSr)

jimmie:

dont know if this has anything to do with post number 6

No that would be a separate issue altogether and would generate a white screen error on ZenCarts side. This seems like a double attempt at revoking the access token is happening. Or that for some reason it's rendering the generated token as invalid.

Where are you seeing this error? On the front side as you attempt to get quotes or in the admin back area?

Also which version of the plugin are you using? And did you download it from the plugin database or off the repository?

10 Aug 2025, 12:31 AM
#120
jimmie avatar

jimmie

Totally Zenned

Join Date:
Jan 2013
Location:
New Port Richey, Florida
Posts:
971
Plugin Contributions:
0

Re: USPS Shipping (RESTful) (USPSr)

this is happening on front end
File name is ZC-USPSRestful-main from github
and resides in zc_plugins