hyperswitch
feat(process_tracker): Invoke record back flow in PCR workflow [V2]
#7660
Merged

feat(process_tracker): Invoke record back flow in PCR workflow [V2] #7660

likhinbopanna merged 7 commits into main from record_back_flow_in_pt
srujanchikke
srujanchikke16 days ago (edited 12 days ago)

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
invoke record back flow in pcr workflow
46d730ba
srujanchikke srujanchikke added A-core
srujanchikke srujanchikke added api-v2
srujanchikke srujanchikke assigned srujanchikke srujanchikke 16 days ago
semanticdiff-com
semanticdiff-com16 days ago (edited 16 days ago)
Merge branch 'main' into record_back_flow_in_pt
ffb1c239
srujanchikke srujanchikke added A-process-tracker
srujanchikke srujanchikke requested a review from Aprabhat19 Aprabhat19 16 days ago
srujanchikke srujanchikke marked this pull request as ready for review 16 days ago
srujanchikke srujanchikke requested a review 16 days ago
srujanchikke srujanchikke requested a review 16 days ago
typos fix
654e3e98
srujanchikke Merge branch 'main' into record_back_flow_in_pt
2a0d7f50
srujanchikke
srujanchikke commented on 2025-03-28
crates/router/src/workflows/revenue_recovery.rs
88 storage_errors::RecoveryError::BillingMerchantConnectorAccountIdNotFound.into(),
89 ))?;
90
91
let billing_mca = store
92
.find_merchant_connector_account_by_id(
93
key_manager_state,
94
&billing_merchant_connector_account_id,
95
&pcr_data.key_store,
96
)
97
.await?;
srujanchikke16 days ago

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 jarnura 16 days ago
jarnura
jarnura requested changes on 2025-03-29
crates/hyperswitch_interfaces/src/connector_integration_v2.rs
5051 + api::ConnectorMandateRevokeV2
5152 + api::authentication_v2::ExternalAuthenticationV2
52 + api::UnifiedAuthenticationServiceV2,
53 + api::UnifiedAuthenticationServiceV2
54
+ api::revenue_recovery_v2::RevenueRecoveryV2,
jarnura15 days ago
Suggested change
+ api::revenue_recovery_v2::RevenueRecoveryV2,
+ api::revenue_recovery::RevenueRecovery,
jarnura12 days ago👍 1

Take this up in next pr

jarnura
jarnura dismissed these changes on 2025-04-01
srujanchikke Merge branch 'main' into record_back_flow_in_pt
195698d6
Aprabhat19
Aprabhat19 dismissed these changes on 2025-04-01
crates/router/src/core/revenue_recovery/types.rs
200 billing_mca: &merchant_connector_account::MerchantConnectorAccount,
176201 ) -> Result<(), errors::ProcessTrackerError> {
177 let db = &*state.store;
202
let db: &dyn StorageInterface = &*state.store;
Aprabhat1912 days ago (edited 12 days ago)

nit: Can you remove this

resolve comments
ecf94e37
srujanchikke srujanchikke dismissed their stale review via ecf94e37 12 days ago
srujanchikke srujanchikke dismissed their stale review via ecf94e37 12 days ago
jarnura
jarnura approved these changes on 2025-04-01
Aprabhat19
Aprabhat19 approved these changes on 2025-04-01
srujanchikke Merge branch 'main' into record_back_flow_in_pt
ad8f19d7
likhinbopanna likhinbopanna merged 40174b3c into main 11 days ago
likhinbopanna likhinbopanna deleted the record_back_flow_in_pt branch 11 days ago

Login to write a write a comment.

Login via GitHub

Reviewers
Assignees
Labels
Milestone