Skip to content

feat(core): add psync support for recovery external payments #7855

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

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

srujanchikke
Copy link
Contributor

@srujanchikke srujanchikke commented Apr 21, 2025

Type of Change

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

Description

Generally in case of external payments we don't get the network error code and error messages from the billing connector. Since this data is important we need to fetch them using Psync call for the Payment connectors and update our payment attempts. In this PR we have added support for Psync in record attempt flow .

Additional Changes

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

Motivation and Context

We are currently recording external attempts from billing connector. To populate necessary data to take decision from ML model we will call payment connector to get network error code and network error message.
Note : this step should be avoided for interal payments which uses record attempt flow.

How did you test it?

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

Copy link

semanticdiff-com bot commented Apr 21, 2025

Review changes with  SemanticDiff

Changed Files
File Status
  crates/router/src/core/payments.rs  1% smaller
  crates/hyperswitch_domain_models/src/payments.rs  0% smaller
  crates/router/src/core/payments/operations/payment_attempt_record.rs  0% smaller

@srujanchikke srujanchikke self-assigned this Apr 22, 2025
@srujanchikke srujanchikke added the A-core Area: Core flows label Apr 22, 2025
@srujanchikke srujanchikke marked this pull request as ready for review April 22, 2025 07:33
@srujanchikke srujanchikke requested review from a team as code owners April 22, 2025 07:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-core Area: Core flows
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant