Keeps failing after 3d secure authentication redirect

Created on 23 May 2022, over 2 years ago
Updated 14 November 2023, 10 months ago

Problem/Motivation

Keeps failing after 3d secure authentication redirect

Steps to reproduce

Customers have got to the point of going through the 3d secure authentication and the authentication being accepted but the redirects back to the site 3dSecureBack/184. with an error message.

The website encountered an unexpected error. Please try again later.

The error that is produced within the error log is

Location

https://www.qmj.co.uk/3dSecureBack/185

Referrer

https://tsys.arcot.com/

Message

Error: Call to undefined function Drupal\commerce_sage\Controller\getPaymentConfigurations() in Drupal\commerce_sage\Controller\CommerceSage->Secure3DBack() (line 17 of /srv/qmj.co.uk/public/mystore/web/modules/contrib/commerce_sage/src/Controller/CommerceSage.php)

#0 [internal function]: Drupal\commerce_sage\Controller\CommerceSage->Secure3DBack()

#1 /srv/qmj.co.uk/public/mystore/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array()

#2 /srv/qmj.co.uk/public/mystore/web/core/lib/Drupal/Core/Render/Renderer.php(564): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()

#3 /srv/qmj.co.uk/public/mystore/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext()

#4 /srv/qmj.co.uk/public/mystore/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext()

And

Location

https://www.qmj.co.uk/3dSecureBack/186

Referrer

https://secure5.arcot.com/

Message

Array ( [cres] => eyJ0aHJlZURTU2VydmVyVHJhbnNJRCI6IjNlMTBlN2Y4LWQzMDMtNGRjYS1iNDA5LTMxYzdhOWI1Njg4NSIsImFjc1RyYW5zSUQiOiIyZDhiMjE4NC0xNTAwLTQ3NjEtYWYzMC1kY2M2NmI2ZmQ2MGYiLCJtZXNzYWdlVHlwZSI6IkNSZXMiLCJtZXNzYWdlVmVyc2lvbiI6IjIuMS4wIiwidHJhbnNTdGF0dXMiOiJZIn0 [threeDSSessionData] => MjdFN0FFNzAtMzZEQi0wQjU0LUQ4RTAtNzMxOTE5RDlGRDM0 )

I have raised with with SagePay and they have said the following.

f the customer can see the 3D secure page, then it will likely be an issue with how the ThreeDSNotificationURL is posting the threeDSSessionData and cRes to the 3D Secure Callback URL.

The?threeDSSessionData?must be BASE64 URL encoded with no padding, and is limited 1024 bytes in length, please can you ensure your “threeDSSessionData” is sent to this specification?

CRes: This is Base64 URL encoded data that is sent to the vendors ThreeDSNotificationURL.

Further information on the PI ACS URL redirection can be found on the following URL:

https://developer-eu.elavon.com/docs/opayo/3d-secure-authentication

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Needs review

Version

1.3

Component

Code

Created by

🇬🇧United Kingdom slopbadger

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇬🇧United Kingdom c_archer Cumbria

    Has there been any progress on this?

  • Status changed to Needs review about 1 year ago
  • 🇬🇧United Kingdom Leo Pitt

    Patch attached to work around this issue:

    • Created a service to provide reusable methods.
    • Replaced bulk of Onsite->getSagepayConfiguration() method with a call to the getSagepayConfiguration() in the new service
    • Use the same service and method in CommerceSage->Secure3DBack() instead of the missing getPaymentConfigurations() method
    • Also replaced some calls to address object properties with calls that use the dedicated address getter methods
  • 🇬🇧United Kingdom c_archer Cumbria

    Have some time for the project next week will test the patch out then

Production build 0.71.5 2024