-
Notifications
You must be signed in to change notification settings - Fork 4.2k
feat(core): add additional revenue recovery call flow #7402
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
Merged
Merged
Changes from all commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
a0ffaa7
add template code for stripebilling
bb432a5
add logic instead of todo in template code
4555023
chore: run formatter
hyperswitch-bot[bot] 8ab0630
Merge branch 'main' into template_code_stripebilling
2ad25d7
fixes errors
3c38093
chore: run formatter
hyperswitch-bot[bot] a2ca88b
Merge branch 'main' into template_code_stripebilling
NISHANTH1221 4412b10
resolved error in default implementation
d6c7f7a
additional api call flow for revenue recovery
0139e03
Merge branch 'main' into template_code_stripebilling
ccfcff3
chore: run formatter
hyperswitch-bot[bot] 4abdce9
Merge branch 'main' into template_code_stripebilling
NISHANTH1221 6e08413
Merge branch 'main' into template_code_stripebilling
NISHANTH1221 3295979
chore: run formatter
hyperswitch-bot[bot] 0d5a8ea
changes in name of the flow in config files
1ad2464
chore: run formatter
hyperswitch-bot[bot] 70b7546
Merge branch 'template_code_stripebilling' into additional_recovery_c…
NISHANTH1221 966ce1b
add paystack in deafult implememtation additional call flow
6f4573a
Merge branch 'main' into additional_recovery_call_flow
NISHANTH1221 4a34e07
added paystack connector in default implementation
e10b589
add debug and clone trait to Additional Revenue Recovery Flow Common …
145a6d9
chore: run formatter
hyperswitch-bot[bot] 2cc26be
resolve spell check
70a430f
add stripebilling in configs
c9ae685
refactor: rename Additional Revenue Recovery related types and traits
524cce1
chore: run formatter
hyperswitch-bot[bot] 66132cb
refactor: reorganize revenue recovery module structure
fc01f6c
chore: run formatter
hyperswitch-bot[bot] f93bbc6
Merge branch 'main' into additional_recovery_call_flow
NISHANTH1221 51e6dcd
change v2 to v1
e5b8314
refactor: update additional revenue recovery call implementations for…
25855cc
refactor: add RevenueRecovery trait and update related implementations
ad1e7dd
chore: run formatter
hyperswitch-bot[bot] 7c05cb5
refactor: update revenue recovery request data structure
f09f19c
Merge branch 'main' into additional_recovery_call_flow
NISHANTH1221 5bf5bf1
feat(connector): add Recurly to additional revenue recovery call
15952db
Merge branch 'main' into additional_recovery_call_flow
NISHANTH1221 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
crates/hyperswitch_domain_models/src/router_flow_types/revenue_recovery.rs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#[derive(Debug, Clone)] | ||
pub struct GetAdditionalRevenueRecoveryDetails; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
crates/hyperswitch_domain_models/src/router_request_types/revenue_recovery.rs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#[derive(Debug, Clone)] | ||
pub struct GetAdditionalRevenueRecoveryRequestData { | ||
/// unique id for making additional revenue recovery call | ||
pub additional_revenue_recovery_id: String, | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
crates/hyperswitch_domain_models/src/router_response_types/revenue_recovery.rs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
use common_utils::types::MinorUnit; | ||
use time::PrimitiveDateTime; | ||
#[derive(Debug, Clone, serde::Deserialize, serde::Serialize)] | ||
pub struct GetAdditionalRevenueRecoveryResponseData { | ||
/// transaction amount against invoice, accepted in minor unit. | ||
pub amount: MinorUnit, | ||
/// currency of the transaction | ||
pub currency: common_enums::enums::Currency, | ||
/// merchant reference id at billing connector. ex: invoice_id | ||
pub merchant_reference_id: common_utils::id_type::PaymentReferenceId, | ||
/// transaction id reference at payment connector | ||
pub connector_transaction_id: Option<common_utils::types::ConnectorTransactionId>, | ||
/// error code sent by billing connector. | ||
pub error_code: Option<String>, | ||
/// error message sent by billing connector. | ||
pub error_message: Option<String>, | ||
/// mandate token at payment processor end. | ||
pub processor_payment_method_token: Option<String>, | ||
/// customer id at payment connector for which mandate is attached. | ||
pub connector_customer_id: Option<String>, | ||
/// Payment gateway identifier id at billing processor. | ||
pub connector_account_reference_id: Option<String>, | ||
/// timestamp at which transaction has been created at billing connector | ||
pub transaction_created_at: Option<PrimitiveDateTime>, | ||
/// transaction status at billing connector equivalent to payment attempt status. | ||
pub status: common_enums::enums::AttemptStatus, | ||
/// payment method of payment attempt. | ||
pub payment_method_type: common_enums::enums::PaymentMethod, | ||
/// payment method sub type of the payment attempt. | ||
pub payment_method_sub_type: common_enums::enums::PaymentMethodType, | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
//! Revenue Recovery Interface | ||
|
||
use hyperswitch_domain_models::{ | ||
router_flow_types::GetAdditionalRevenueRecoveryDetails, | ||
router_request_types::revenue_recovery::GetAdditionalRevenueRecoveryRequestData, | ||
router_response_types::revenue_recovery::GetAdditionalRevenueRecoveryResponseData, | ||
}; | ||
|
||
use super::{ConnectorCommon, ConnectorIntegration}; | ||
/// trait RevenueRecovery | ||
pub trait RevenueRecovery: ConnectorCommon + AdditionalRevenueRecovery {} | ||
|
||
/// trait AdditionalRevenueRecovery | ||
pub trait AdditionalRevenueRecovery: | ||
ConnectorIntegration< | ||
GetAdditionalRevenueRecoveryDetails, | ||
GetAdditionalRevenueRecoveryRequestData, | ||
GetAdditionalRevenueRecoveryResponseData, | ||
> | ||
{ | ||
} |
24 changes: 24 additions & 0 deletions
24
crates/hyperswitch_interfaces/src/api/revenue_recovery_v2.rs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
//! Revenue Recovery Interface V2 | ||
|
||
use hyperswitch_domain_models::{ | ||
router_data_v2::flow_common_types::GetAdditionalRevenueRecoveryFlowCommonData, | ||
router_flow_types::GetAdditionalRevenueRecoveryDetails, | ||
router_request_types::revenue_recovery::GetAdditionalRevenueRecoveryRequestData, | ||
router_response_types::revenue_recovery::GetAdditionalRevenueRecoveryResponseData, | ||
}; | ||
|
||
use crate::connector_integration_v2::ConnectorIntegrationV2; | ||
|
||
/// trait RevenueRecoveryV2 | ||
pub trait RevenueRecoveryV2: AdditionalRevenueRecoveryV2 {} | ||
|
||
/// trait AdditionalRevenueRecoveryV2 | ||
pub trait AdditionalRevenueRecoveryV2: | ||
ConnectorIntegrationV2< | ||
GetAdditionalRevenueRecoveryDetails, | ||
GetAdditionalRevenueRecoveryFlowCommonData, | ||
GetAdditionalRevenueRecoveryRequestData, | ||
GetAdditionalRevenueRecoveryResponseData, | ||
> | ||
{ | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this commented ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since the connector is not enabled the cypress tests will fail on this. I will enable it in subsequent pr's