Skip to content

fix(connector): [Worldpay] handle multiple ddc submission for CompleteAuthorize #8741

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jul 29, 2025

Conversation

kashif-m
Copy link
Contributor

@kashif-m kashif-m commented Jul 24, 2025

Type of Change

  • Bugfix

Description

Fixes race condition in Worldpay 3DS Device Data Collection (DDC) flow causing bodyDoesNotMatchSchema errors.

Changes made:

  • Extended DDC timeout from 8s to 10s in client-side JavaScript
  • Added ddcProcessed flag to prevent duplicate submissions on client-side
  • Reject collectionReference submissions when payment is in AuthenticationPending state
  • Fixed CSS media query syntax (@media (max-width: 600px))
  • Added Cypress test case for both client and server-side race conditions for DDC submissions

Additional Changes

  • This PR modifies the API contract
  • This PR modifies the database schema
  • This PR modifies application configuration/environment variables

Motivation and Context

Race condition caused intermittent 3DS payment failures when DDC took > 8 seconds.

How did you test it?

1. DDC race case in isolation Screenshot 2025-07-24 at 12 02 50 PM
2. All test cases for Worldpay Screenshot 2025-07-25 at 12 52 56 AM

Note

Checklist

  • I formatted the code cargo +nightly fmt --all
  • I addressed lints thrown by cargo clippy
  • I reviewed the submitted code
  • I added unit tests for my changes where possible

…ze flow and handle multiple ddc submission on client side
@kashif-m kashif-m self-assigned this Jul 24, 2025
@kashif-m kashif-m requested review from a team as code owners July 24, 2025 06:33
Copy link

semanticdiff-com bot commented Jul 24, 2025

@kashif-m kashif-m linked an issue Jul 24, 2025 that may be closed by this pull request
2 tasks
@kashif-m kashif-m changed the title fix(connector): [Worldpay] handle race conditions for CompleteAuthorize flow and handle multiple ddc submission on client side fix(connector): [Worldpay] handle multiple ddc submission for CompleteAuthorize Jul 24, 2025
@kashif-m kashif-m requested a review from AkshayaFoiger July 24, 2025 10:44
AkshayaFoiger
AkshayaFoiger previously approved these changes Jul 24, 2025
jagan-jaya
jagan-jaya previously approved these changes Jul 24, 2025
Copy link
Member

@pixincreate pixincreate left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

other than that, lgtm.

Copy link
Member

@pixincreate pixincreate left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

other than that, lgtm.

},
},
}),
DDCConfig: {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: these can be imported from commons?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As per the discussions - the script for DDC is usually very different for different connectors.

Keeping them in Worldpay instead to ensure changing Commons does not affect this connector.

@likhinbopanna likhinbopanna added this pull request to the merge queue Jul 29, 2025
Merged via the queue into main with commit f6cdddc Jul 29, 2025
18 of 26 checks passed
@likhinbopanna likhinbopanna deleted the 8733-bug-worldpay-ddc-submission-race-conditions branch July 29, 2025 08:47
pixincreate added a commit that referenced this pull request Jul 29, 2025
…acilitapay-webhooks

* 'main' of github.com:juspay/hyperswitch:
  fix(connector): [Worldpay] handle multiple ddc submission for CompleteAuthorize (#8741)
  feat(connector): [Adyen] receive incoming webhooks for pix expiry (#8720)
  feat(connector): [FISERV] Added GooglePay Payment Method - Connector Decryption Flow (#8658)
  feat(connector): [BLUECODE] Added Template Code (#8756)
  chore(version): 2025.07.29.0
pixincreate added a commit that referenced this pull request Aug 1, 2025
…rver

* 'main' of github.com:juspay/hyperswitch: (25 commits)
  chore: `xof` currency to cybersource cards (#8799)
  chore(version): 2025.08.01.0
  feat(core): Implement UCS based  upi for  paytm and phonepe (#8732)
  feat(connector): [katapult]add template code for katapult (#8783)
  feat(router): introduce `feature`  and `feature_data` to gsm (#7771)
  feat(connector): [cybersource] add changes for field CybersourceConsumerAuthInformation (#8768)
  feat(authentication): added authentication sync api (#8596)
  feat(connector): [facilitapay] fix refunds, add webhook and void support (#8778)
  feat(connector): [payload] add recurring payments (#8597)
  chore(version): 2025.07.31.0
  feat(connector): [Flexiti]Add support for flexiti connector  (#8743)
  chore(router): events enhancement for kafka (#8780)
  ci(cypress): Making a mandate payment with large customer user agents (#8790)
  fix(openapi): update create_platform endpoint in api-reference docs (#8782)
  chore(version): 2025.07.30.0
  fix(connector): [GLOBALPAY] Added Tokenization Flow for CITs (#8568)
  feat(routing): Add api-refs for new decision engine endpoints (#8709)
  fix: replace xtrim with xdel to support  older redis version (#8515)
  fix(connector): [Worldpay] handle multiple ddc submission for CompleteAuthorize (#8741)
  feat(connector): [Adyen] receive incoming webhooks for pix expiry (#8720)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] worldpay DDC submission race conditions
7 participants