Skip to content

feat: add invoke_ddc next action support for DDC flow#1476

Open
AbhishekChorotiya wants to merge 2 commits intojuspay:mainfrom
AbhishekChorotiya:feat/invoke_ddc_next_action
Open

feat: add invoke_ddc next action support for DDC flow#1476
AbhishekChorotiya wants to merge 2 commits intojuspay:mainfrom
AbhishekChorotiya:feat/invoke_ddc_next_action

Conversation

@AbhishekChorotiya
Copy link
Copy Markdown
Contributor

Type of Change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring
  • Dependency updates
  • Documentation
  • CI/CD

Description

This PR adds support for invoke_ddc next action type to handle Device Data Collection (DDC) flow for 3DS authentication.

Changes:

  1. Added ddcData type with iframe_url and timeout_ms fields in PaymentConfirmTypes
  2. Added redirectMode and url fields to nextAction type for redirect handling
  3. Implemented invoke_ddc next action handler that:
    • Creates a hidden iframe for DDC collection
    • Sets up message listener for next_action response
    • Handles timeout with configurable timeout_ms (defaults to 30000ms)
    • Supports both required and if_required redirect modes
    • Properly cleans up resources (iframe, event listeners, timeout) on completion

How did you test it?

Tested locally with payment flows requiring DDC invocation.

Checklist

  • I ran npm run re:build
  • I reviewed submitted code
  • I added unit tests for my changes where possible

@semanticdiff-com
Copy link
Copy Markdown

Review changes with  SemanticDiff

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.

1 participant