Zen Cart Logo
Forums / Addon Shipping Modules / UPS Shipping using RESTful/OAuth API [Support Thread]

UPS Shipping using RESTful/OAuth API [Support Thread]

Sticky

Views: 45,474

Results 41 to 60 of 220
29 Sep 2023, 3:18 PM
#41
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,103
Plugin Contributions:
56

UPS Shipping using RESTful/OAuth API [Support Thread]

arj3090:

I have been struggling with getting this to work. When trying to checkout, I get these messages:

"Your available shipping options have changed. Please re-select your desired shipping method."

"This is currently the only shipping method available to use on this order."

Can anyone give me any insight?

ZenCart 1.5.6
Are there any myDEBUG*.log files present in the site's /logs directory? What payment, shipping and order-total modules are being used by the site?

29 Sep 2023, 5:01 PM
#42
bustin98 avatar

bustin98

New Zenner

Join Date:
Jul 2019
Location:
Norwalk, Ohio
Posts:
12
Plugin Contributions:
0

Re: UPS Shipping using RESTful/OAuth API [Support Thread]

I am seeing a discrepancy in returned pricing between the old XML plugin and this new oAuth plugin. It's pretty much $3.47 with each shipping option. Ground is a little less. I would assume pricing is pulled based on the account associated with the ID. Has anyone seen this behavior? I have reached out to UPS support, and of course I was recommended to ask here. I am going to push back a little and get a clearer picture of the background communication, but if this post can be another source of insight, that would be great.

29 Sep 2023, 6:01 PM
#43
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,103
Plugin Contributions:
56

Re: UPS Shipping using RESTful/OAuth API [Support Thread]

bustin98:

I am seeing a discrepancy in returned pricing between the old XML plugin and this new oAuth plugin. It's pretty much $3.47 with each shipping option. Ground is a little less. I would assume pricing is pulled based on the account associated with the ID. Has anyone seen this behavior? I have reached out to UPS support, and of course I was recommended to ask here. I am going to push back a little and get a clearer picture of the background communication, but if this post can be another source of insight, that would be great.
You can help UPS (and maybe me?) help you by turning on the shipping-module's debug feature, running a transaction where the pricing is "off" and then turning that debug feature off.

When you've got the debug-file generated, post back here and I'll PM you my direct email address.

29 Sep 2023, 11:34 PM
#44
arj3090 avatar

arj3090

New Zenner

Join Date:
Dec 2018
Location:
Orangeburg, SC
Posts:
7
Plugin Contributions:
0

Re: UPS Shipping using RESTful/OAuth API [Support Thread]

lat9:

Are there any myDEBUG*.log files present in the site's /logs directory? What payment, shipping and order-total modules are being used by the site?Nothing in the log directory. I even enabled debugging

Enabled Payment modules:

  • Free Order
  • Paypal Express
  • Square Web pay

Order Total :

  • Group Discount
  • Shipping Insurance
  • Low Order Fee
  • Shipping
  • Sub Total
  • Tax
  • Total

Shipping :

  • Free Shipping
  • United Parcel Service V1.1.0
29 Sep 2023, 11:53 PM
#45
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,103
Plugin Contributions:
56

Re: UPS Shipping using RESTful/OAuth API [Support Thread]

@arj3090, are there any .log files, perchance, in the site's /cache sub-directory?

2 Oct 2023, 6:25 PM
#46
bustin98 avatar

bustin98

New Zenner

Join Date:
Jul 2019
Location:
Norwalk, Ohio
Posts:
12
Plugin Contributions:
0

Re: UPS Shipping using RESTful/OAuth API [Support Thread]

I have the files for both the XML and oAuth. Thank you.

2 Oct 2023, 8:27 PM
#47
arj3090 avatar

arj3090

New Zenner

Join Date:
Dec 2018
Location:
Orangeburg, SC
Posts:
7
Plugin Contributions:
0

Re: UPS Shipping using RESTful/OAuth API [Support Thread]

lat9:

@arj3090, are there any .log files, perchance, in the site's /cache sub-directory?No log files in the cache directory either

3 Oct 2023, 3:13 PM
#48
bustin98 avatar

bustin98

New Zenner

Join Date:
Jul 2019
Location:
Norwalk, Ohio
Posts:
12
Plugin Contributions:
0

Re: UPS Shipping using RESTful/OAuth API [Support Thread]

lat9:

You can help UPS (and maybe me?) help you by turning on the shipping-module's debug feature, running a transaction where the pricing is "off" and then turning that debug feature off.

When you've got the debug-file generated, post back here and I'll PM you my direct email address.

I have a reply from UPS. The reason for the different costs is the XML has a residentialAddressIndicator in the Ship To while the oAuth does not. Is this handled somehow? I do not see an option to manage this in the settings.

3 Oct 2023, 5:10 PM
#49
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,103
Plugin Contributions:
56

Re: UPS Shipping using RESTful/OAuth API [Support Thread]

bustin98:

I have a reply from UPS. The reason for the different costs is the XML has a residentialAddressIndicator in the Ship To while the oAuth does not. Is this handled somehow? I do not see an option to manage this in the settings.
Towards the bottom of the settings, there's

Quote Type
Quote for Residential or Commercial Delivery

3 Oct 2023, 7:05 PM
#50
bustin98 avatar

bustin98

New Zenner

Join Date:
Jul 2019
Location:
Norwalk, Ohio
Posts:
12
Plugin Contributions:
0

Re: UPS Shipping using RESTful/OAuth API [Support Thread]

lat9:

Towards the bottom of the settings, there's

Quote Type
Quote for Residential or Commercial Delivery

I updated the setting, but the numbers do not change. Looking at the log file, I do not see the option listed.

3 Oct 2023, 8:49 PM
#51
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,103
Plugin Contributions:
56

Re: UPS Shipping using RESTful/OAuth API [Support Thread]

bustin98:

I updated the setting, but the numbers do not change. Looking at the log file, I do not see the option listed.
Hmm, perhaps that's because that setting isn't actually used by the shipping method (sigh). I'll get that corrected; thanks for the report!

4 Oct 2023, 3:44 PM
#52
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,103
Plugin Contributions:
56

Re: UPS Shipping using RESTful/OAuth API [Support Thread]

v1.2.0 is now available for download: https://www.zen-cart.com/downloads.php?do=file&id=2374

This release contains changes associated with the following GitHub issues:

#12: Correct PHP Warning when UPS request fails.
#13: Remove redundant code.
#14: Enable fixed-price handling fee to be applied once/order or once/box.
#15: Remove function return-type hints, not compatible with PHP versions prior to 7.4.
#16: Include use of previously-missing Residential/Commercial quote.
#17: Correct PHP 8.2 Fatal error when handling-fee is configured as an empty string.

Note that upgrading is automatic!

5 Oct 2023, 8:15 PM
#53
zippkits avatar

zippkits

New Zenner

Join Date:
Dec 2010
Location:
Central Indiana
Posts:
36
Plugin Contributions:
0

Re: UPS Shipping using RESTful/OAuth API [Support Thread]

V1.2.0 loaded up. Getting this error, even though I double checked my ID and secret:

2023-10-05 16:01:19: {
"response": {
"errors": [
{
"code": "250002",
"message": "Invalid Authentication Information."

5 Oct 2023, 8:26 PM
#54
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,103
Plugin Contributions:
56

Re: UPS Shipping using RESTful/OAuth API [Support Thread]

Zippkits:

V1.2.0 loaded up. Getting this error, even though I double checked my ID and secret:

2023-10-05 16:01:19: {
"response": {
"errors": [
{
"code": "250002",
"message": "Invalid Authentication Information."
Did you also make sure to add the "Rating" and "Time in Transit" Products to that UPS App that's associated with those credentials? See this (https://github.com/lat9/upsoauth/wiki/Creating-Your-OAuth-Client-ID-and-Client-Secret) UPSoAuth wiki article for additional information.

6 Oct 2023, 4:06 PM
#55
zippkits avatar

zippkits

New Zenner

Join Date:
Dec 2010
Location:
Central Indiana
Posts:
36
Plugin Contributions:
0

Re: UPS Shipping using RESTful/OAuth API [Support Thread]

lat9:

Did you also make sure to add the "Rating" and "Time in Transit" Products to that UPS App that's associated with those credentials? See this (https://github.com/lat9/upsoauth/wiki/Creating-Your-OAuth-Client-ID-and-Client-Secret) UPSoAuth wiki article for additional information.

I did now lol.
Logs show rates are coming, but it still breaks at the shipping page.
Here is the error:

[06-Oct-2023 11:56:20 America/Indiana/Indianapolis] Request URI: /index.php?main_page=checkout_shipping&zenid=xxxx, IP address: xxxx
#1 UpsOAuthApi->getCurrentMethodQuote() called at [/home/xxxx/public_html/includes/modules/shipping/upsoauth/UpsOAuthApi.php:440]
#2 UpsOAuthApi->getShippingMethodsFromQuotes() called at [/home/xxxx/public_html/includes/modules/shipping/upsoauth.php:326]
#3 upsoauth->quote() called at [/home/xxxx/public_html/includes/classes/shipping.php:171]
#4 shipping->quote() called at [/home/xxxx/public_html/includes/modules/pages/checkout_shipping/header_php.php:187]
#5 require(/home/xxxx/public_html/includes/modules/pages/checkout_shipping/header_php.php) called at [/home/xxxx/public_html/index.php:36]

[06-Oct-2023 11:56:20 America/Indiana/Indianapolis] PHP Catchable fatal error: Argument 2 passed to UpsOAuthApi::getCurrentMethodQuote() must be an instance of string, string given, called in /home/xxxx/public_html/includes/modules/shipping/upsoauth/UpsOAuthApi.php on line 440 and defined in /home/xxxx/public_html/includes/modules/shipping/upsoauth/UpsOAuthApi.php on line 450

6 Oct 2023, 7:14 PM
#56
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,103
Plugin Contributions:
56

Re: UPS Shipping using RESTful/OAuth API [Support Thread]

Zippkits:

I did now lol.
Logs show rates are coming, but it still breaks at the shipping page.
Here is the error:

[06-Oct-2023 11:56:20 America/Indiana/Indianapolis] Request URI: /index.php?main_page=checkout_shipping&zenid=xxxx, IP address: xxxx
#1 UpsOAuthApi->getCurrentMethodQuote() called at [/home/xxxx/public_html/includes/modules/shipping/upsoauth/UpsOAuthApi.php:440]
#2 UpsOAuthApi->getShippingMethodsFromQuotes() called at [/home/xxxx/public_html/includes/modules/shipping/upsoauth.php:326]
#3 upsoauth->quote() called at [/home/xxxx/public_html/includes/classes/shipping.php:171]
#4 shipping->quote() called at [/home/xxxx/public_html/includes/modules/pages/checkout_shipping/header_php.php:187]
#5 require(/home/xxxx/public_html/includes/modules/pages/checkout_shipping/header_php.php) called at [/home/xxxx/public_html/index.php:36]

[06-Oct-2023 11:56:20 America/Indiana/Indianapolis] PHP Catchable fatal error: Argument 2 passed to UpsOAuthApi::getCurrentMethodQuote() must be an instance of string, string given, called in /home/xxxx/public_html/includes/modules/shipping/upsoauth/UpsOAuthApi.php on line 440 and defined in /home/xxxx/public_html/includes/modules/shipping/upsoauth/UpsOAuthApi.php on line 450
Dang it; I'm guessing (please verify) that your site's running on PHP 5.6.

6 Oct 2023, 8:23 PM
#57
zippkits avatar

zippkits

New Zenner

Join Date:
Dec 2010
Location:
Central Indiana
Posts:
36
Plugin Contributions:
0

Re: UPS Shipping using RESTful/OAuth API [Support Thread]

Correct. 5.6.40

6 Oct 2023, 8:30 PM
#58
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,843
Plugin Contributions:
17

Re: UPS Shipping using RESTful/OAuth API [Support Thread]

That was end of life (EOL) in 2019! Most hosts do not use less that 7.4 and that was EOL a year ago.
You need to upgrade while you can still run your site and upgrade. You may wake up tomorrow and your host has turned off everything under 7.4. You see stories of that often on the forum.

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

6 Oct 2023, 8:33 PM
#59
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,967
Plugin Contributions:
8

Re: UPS Shipping using RESTful/OAuth API [Support Thread]

Zippkits:

Correct. 5.6.40

the first version of this module was released 20 june 2023.

php 5.6 was EOL (as in end of life) 31 dec 2018.

i would encourage the developer to NOT make changes to new software to support software that was EOL so long ago.

author of square Webpay, now with Apple Pay and Google Pay.
mXworks
donations: venmo or paypal accepted.
premium consistent excellent support. available for hire.

6 Oct 2023, 9:16 PM
#60
zippkits avatar

zippkits

New Zenner

Join Date:
Dec 2010
Location:
Central Indiana
Posts:
36
Plugin Contributions:
0

Re: UPS Shipping using RESTful/OAuth API [Support Thread]

Thanks for the help!