Skip to content
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

feat(router): add automatic retries and step up 3ds flow #2834

Merged
merged 8 commits into from
Nov 13, 2023

Conversation

sai-harsha-vardhan
Copy link
Contributor

Type of Change

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

Description

add automatic retries and step up 3ds flow

  1. Auto Retries -> When a payment fails due to connector error and if the error is decided to be retryable by Gsm. Then instead of returning error the trackers are updated and the next eligible connector is called based on merchant configuration.

  2. Step up 3Ds -> When a no-3ds payment fails due to connector error and if the error is eligible to step up by Gsm. Then instead of returning error the trackers are updated and the payment is retried by enforcing 3ds with same connector based on merchant configuration.

Additional Changes

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

Motivation and Context

How did you test it?

Tested Manually

  1. Enable retries for merchant by enabling should_call_gsm_{mid} config
    image

  2. Set max_auto_retries_{mid} config to 1
    image

  3. Add GSM for relevant connector, code and message to enable retry with step_up_possible as false

image
  1. Make a payment to replicate the payment failure with code and message configured in Gsm, can be seen that payment is retried with next eligible connector (attempt_count = 2 and can see detailed view using payments retrieve api with expand_attempts = true flag)
    image
    image

  2. Now enable step_up_enabled_{mid} config for merchant
    image

  3. Update Gsm to enable step_up_possible
    image

  4. Now, redo the same payment can be seen that instead of retrying with next connector it gets retried with same connector but now enforcing three_ds
    image
    image

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
  • I added a CHANGELOG entry if applicable

@sai-harsha-vardhan sai-harsha-vardhan added A-core Area: Core flows C-feature Category: Feature request or enhancement S-waiting-on-review Status: This PR has been implemented and needs to be reviewed labels Nov 10, 2023
@sai-harsha-vardhan sai-harsha-vardhan self-assigned this Nov 10, 2023
@sai-harsha-vardhan sai-harsha-vardhan requested review from a team as code owners November 10, 2023 11:30
@likhinbopanna likhinbopanna added this pull request to the merge queue Nov 13, 2023
Merged via the queue into main with commit d2968c9 Nov 13, 2023
10 of 12 checks passed
@likhinbopanna likhinbopanna deleted the add-auto-retries branch November 13, 2023 17:03
@likhinbopanna likhinbopanna removed the S-waiting-on-review Status: This PR has been implemented and needs to be reviewed label Nov 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-core Area: Core flows C-feature Category: Feature request or enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants