From @deardagny in #3322288:

I just started testing the UPS APIs and it looks like they may not be providing access keys anymore (sunsetting and moving exclusively to OAuth 2.0 by the sound of it). Am I correct in thinking this module will need a rework to support authentication via OAuth, or am I just missing something?

From @svouthi:

UPS has implemented an OAuth 2.0 security model for all APIs to enhance the overall security for our customers to reduce fraud and provide enhanced API capabilities. This change impacts your current API integration and requires you to make updates to your existing application interface.

How will this impact my API integration?

• Beginning June 5, 2023, UPS will no longer issue API access keys

• On June 3, 2024, access keys will no longer be supported for authentication to UPS APIs

• You will need to obtain OAuth API credentials from the new UPS Developer Portal and update your security protocols to OAuth 2.0 prior to June 3, 2024 to continue transacting with UPS APIs

• Any legacy UPS API integrations using XML, SOAP, or legacy JSON payloads will also be required to convert to the RESTful APIs

We have created an API access key migration guide to assist with your migration from access keys to OAuth 2.0. If you obtained an access key to provide to a 3rd party please notify them of these changes immediately.

CommentFileSizeAuthor
#19 standardrates.png61.01 KBintrofini
#19 negotiatedrates.png63.56 KBintrofini
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

DamienMcKenna created an issue. See original summary.

DamienMcKenna’s picture

Patryk Padus’s picture

As stated "changes immediately" are needed and is crtical. We have now same issue as well.
Is there any news about that?
What i see is there XML used: https://git.drupalcode.org/project/commerce_ups/-/blob/8.x-3.x/src/UPSRa...

As stated composer: https://git.drupalcode.org/project/commerce_ups/-/blame/8.x-3.x/composer...
This library don't support oAuth and is abandom: https://github.com/gabrielbull/php-ups-api/issues/370

There is new library needed to be incorporate:
https://github.com/abantecart/ups-php

It's now only one to be incorporate to existing package and set as v4 version to difference for change of API provider

Patryk Padus’s picture

I ask about difference if we like to incorporate (as we should replace all old XML endpoints as they too will be obsolete): https://github.com/abantecart/ups-php/issues/7
We should only replace API as issue is critical and required to be solved in fastest manner to have 1 from 2 available shipping integration provider

Patryk Padus’s picture

Maintainer suggest only to swap library and maintaining will be provided in future : https://github.com/abantecart/ups-php/issues/7#issuecomment-1832083838

DamienMcKenna’s picture

Title: OAuth 2.0 support? (D9+) » OAuth 2.0 support? (D10+)

Given that D9 is no longer supported..

Patryk Padus’s picture

@DamienMcKenna do you need help? Are you into this issue? It block whole Commerce deployment as now is don't have one production grade shipping method integration

DamienMcKenna’s picture

Sorry, but I'm not in a position to work on this.

adTumbler’s picture

Ryan, this is a total show stopper issue to our project. UPS will not issue an old style API key and we have to have UPS shipping on our rewards portal. Please can you let us know if we can help with any development?

Patryk Padus’s picture

https://www.drupal.org/u/jsacksick can you check it? This can require to replace whole API and fixes for old one as well as XML method will require to be removed

johne’s picture

It's definitely not a drop in replacement. I'm not sure how different the two libraries are but I can say their folder structure and class names are not the same.

tBKoT made their first commit to this issue’s fork.

dastan56’s picture

Hi, any update on this? till can we expect a release with the OAuth functionality, thanks

tBKoT’s picture

Status: Active » Needs review
DamienMcKenna’s picture

Thank you tBKoT!

Might anyone have some time to test this out?

johne’s picture

I should be able to test this last this week.

introfini made their first commit to this issue’s fork.

introfini’s picture

FileSize
63.56 KB
61.01 KB

I've reviewed the patch; it's functioning well overall. However, there are some key points to address:

  1. To avoid errors, implement the solution found here: #3428043: Error: Call to a member function getLength()
  2. If utilizing any default packages, refer to this important note: #3432389: Default UPS packages types need updating
  3. The issue with Negotiated Rates not working has been resolved; I've already committed the fix to the merge request.

Testing Standard Rates vs. Negotiated Rates:

standard rates

negotiated rates

4kant’s picture

Hi,
I´m still having problems with negotiated rates.
After applying latest patch 7 to the (also latest) dev-Version.

Actually, rates get reduced from e.g. 47.07 (= standard rate) to 46.60 (= negotiated).
But negotiated should go to something like 18.81

I´m sure I do use the correct credentials (especially account number).

Do I have to use any other patches besides this 7.patch to get this solved?

Thanks!