-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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(core): Payments core modification for open banking connectors #3947
Conversation
…h into open-banking-payments-core
…h into open-banking-payments-core
@@ -4669,6 +4692,40 @@ pub fn validate_session_expiry(session_expiry: u32) -> Result<(), errors::ApiErr | |||
} | |||
} | |||
|
|||
pub fn get_recipient_id_for_open_banking( |
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.
this can be an impl on the type
webhook_url: data.request.webhook_url, | ||
complete_authorize_url: data.request.complete_authorize_url, | ||
browser_info: data.request.browser_info, | ||
connector_transaction_id: match data.response { |
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.
can we take this from the payment attempt? we should not be inferring fields from the response if we are not calling the connector
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.
LGTM on behalf of @juspay/hyperswitch-routing
crates/router/src/core/payments.rs
Outdated
@@ -201,6 +202,10 @@ where | |||
) | |||
.await?; | |||
|
|||
let op_ref = &operation; | |||
let should_trigger_post_processing_flows = |
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.
can use is_operation_confirm function
crates/router/src/core/payments.rs
Outdated
.payment_method | ||
.get_required_value("PaymentMethod")?; | ||
|
||
let merchant_recipient_data = if payment_method == enums::PaymentMethod::OpenBanking { |
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.
This check can be done inside the function
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.
LGTM on behalf of @juspay/hyperswitch-routing
Type of Change
Description
Additional Changes
Motivation and Context
How did you test it?
payment_method
asopen_banking
andpayment_method_type
asopen_banking_pis
Response -
Checklist
cargo +nightly fmt --all
cargo clippy