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(process_tracker): Invoke record back flow in PCR workflow [V2] #7660

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

Conversation

srujanchikke
Copy link
Contributor

@srujanchikke srujanchikke commented Mar 28, 2025

Type of Change

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

Description

What is record back flow ?
After payment is retried by revenue recovery by PCR workflow, We need to update the billing processor(update the invoce or record the attempt).This PR invokes record back functionality in process tracker flow for Terminal status.

Note: Adding support for retrying failed outgoing recordback webhooks is still pending attached in this issues.

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?

Can be tested once this PR is merged #7614

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

@srujanchikke srujanchikke added A-core Area: Core flows api-v2 labels Mar 28, 2025
@srujanchikke srujanchikke self-assigned this Mar 28, 2025
Copy link

semanticdiff-com bot commented Mar 28, 2025

@srujanchikke srujanchikke added the A-process-tracker Area: Process tracker label Mar 28, 2025
@srujanchikke srujanchikke requested a review from Aprabhat19 March 28, 2025 07:21
@srujanchikke srujanchikke marked this pull request as ready for review March 28, 2025 07:22
@srujanchikke srujanchikke requested review from a team as code owners March 28, 2025 07:22
Comment on lines +91 to +97
let billing_mca = store
.find_merchant_connector_account_by_id(
key_manager_state,
&billing_merchant_connector_account_id,
&pcr_data.key_store,
)
.await?;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note : We cannot avoid db call here since we need connector creds to make record back. Get MCA will not give api keys to call connector.

@srujanchikke srujanchikke requested a review from jarnura March 28, 2025 08:15
@@ -49,7 +50,8 @@ impl<
+ api::FraudCheckV2
+ api::ConnectorMandateRevokeV2
+ api::authentication_v2::ExternalAuthenticationV2
+ api::UnifiedAuthenticationServiceV2,
+ api::UnifiedAuthenticationServiceV2
+ api::revenue_recovery_v2::RevenueRecoveryV2,
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
+ api::revenue_recovery_v2::RevenueRecoveryV2,
+ api::revenue_recovery::RevenueRecovery,

Copy link
Member

Choose a reason for hiding this comment

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

Take this up in next pr

jarnura
jarnura previously approved these changes Apr 1, 2025
@@ -49,7 +50,8 @@ impl<
+ api::FraudCheckV2
+ api::ConnectorMandateRevokeV2
+ api::authentication_v2::ExternalAuthenticationV2
+ api::UnifiedAuthenticationServiceV2,
+ api::UnifiedAuthenticationServiceV2
+ api::revenue_recovery_v2::RevenueRecoveryV2,
Copy link
Member

Choose a reason for hiding this comment

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

Take this up in next pr

Aprabhat19
Aprabhat19 previously approved these changes Apr 1, 2025
) -> Result<(), errors::ProcessTrackerError> {
let db = &*state.store;
let db: &dyn StorageInterface = &*state.store;
Copy link
Contributor

@Aprabhat19 Aprabhat19 Apr 1, 2025

Choose a reason for hiding this comment

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

nit: Can you remove this

@srujanchikke srujanchikke dismissed stale reviews from Aprabhat19 and jarnura via ecf94e3 April 1, 2025 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-core Area: Core flows A-process-tracker Area: Process tracker api-v2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants