Problem/Motivation
In js/payer-authentication.js the submit event is dispatched at line 16, but the listener that handles
it is not attached until line 37. A synthetic submit event does not submit a form, it only runs listeners, so on the
first behavior attach nothing happens.
With auto_submit_review_step enabled and enrollment returning PENDING_AUTHENTICATION, that
dispatch is the only thing that submits the step-up form. When it does nothing the shopper gets a blank checkout
column: the pane renders nothing itself, the action button is hidden by js-hide, and the challenge
iframe stays at about:blank. No JavaScript error, no watchdog entry.
It works on any later Drupal.attachBehaviors(), because the listener from the previous pass catches the
new dispatch. That is why applying a coupon appears to fix it, and why a second enrollment appears in the
CyberSource logs.
Both enable_payer_authentication and auto_submit_review_step default to FALSE, and the
card has to actually be challenged, so most sites never hit it. Anything else causing a second behavior attach, such
as a BigPipe placeholder, hides it completely.
Steps to reproduce
-
Configure a Flex gateway against a merchant account with Payer Authentication enabled, and turn on both
enable_payer_authenticationandauto_submit_review_step. - Add the
cybersource_flex_reviewpane at the review step. - Check out with a card the issuer will challenge, for example
4000000000002503.
Expected: the challenge is displayed. Actual: the checkout column is blank with no button. The step-up form is in
the DOM with a valid JWT and its iframe is still about:blank.
Running Drupal.attachBehaviors(document.body, drupalSettings) in the console displays the challenge
immediately.
Reproduced on a clean Commerce Kickstart install with no custom code.
Proposed resolution
Move the dispatch below the submit listener. Nothing else changes.

Verified against a sandbox with enrollment returning PENDING_AUTHENTICATION. Without the change
checkout stops at /checkout/N/review. With it the challenge renders, the one time code is accepted and
the order completes. Frictionless and non-3DS cards are unaffected, and there is still one StepUp and one notify
request per order.
Remaining tasks
- Review and commit the MR.
-
Separate issue:
addEventListenerruns on every attach with noonce()guard, so an AJAX
rebuild stacks duplicate handlers.
User interface changes
None.
API changes
None.
Data model changes
None.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | payer-authentication-autosubmit-3619561-2.patch | 1.19 KB | adrianandres |
| Screenshot from 2026-08-27 14-43-03.png | 68.58 KB | adrianandres |
Issue fork commerce_cybersource-3619561
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:
Comments
Comment #3
adrianandres commentedComment #4
adrianandres commentedComment #6
vmarchukComment #7
vmarchukThe fix looks good to me! I also updated the branch to version 2.x and changed the version to 2.x-dev.