-
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(connector): [DEUTSCHEBANK] Integrate SEPA Payments #5826
Conversation
Review changes with SemanticDiff. Analyzed 20 of 31 files. Overall, the semantic diff is 13% smaller than the GitHub diff. File Information
|
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.
Core changes Looks Good to me
let tx_id = req | ||
.request | ||
.connector_transaction_id | ||
.get_connector_transaction_id() | ||
.change_context(errors::ConnectorError::MissingConnectorTransactionID)?; |
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 do this sync with our payment_id?
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.
No. Only with deutesche tx_id
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.
Add the configurations in connector_configs for the dashboard.
Also please update the sheet for tracking connector feature set
let response: deutschebank::DeutschebankPaymentsResponse = res | ||
.response | ||
.parse_struct("Deutschebank PaymentsCaptureResponse") | ||
.change_context(errors::ConnectorError::ResponseDeserializationFailed)?; | ||
event_builder.map(|i| i.set_response_body(&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.
Rename the parse_struct to PaymentsCancelResponse
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.
Done
first_name: billing_address.get_first_name()?.clone(), | ||
last_name: billing_address.get_last_name()?.clone(), | ||
}), |
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.
Add these in defualt.rs
for dynamic fields
form_fields: HashMap::from([ | ||
( | ||
"reference".to_string(), | ||
item.response.reference.unwrap_or("".to_string()), |
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.
If reference is a critical fields as if its not available you fail the payment in complete_authorize, its better to fail it here itself
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.
Done
let resource_id = ResponseId::ConnectorTransactionId( | ||
item.response | ||
.tx_id | ||
.ok_or(errors::ConnectorError::MissingConnectorTransactionID)?, |
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.
If connector_transaction_id is missing shall we fail the payment or mark it pending?
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.
We are not marking tx_id as option now. Deserialization will happen if tx_id is not in response.
Ok(Self { | ||
amount: item.amount.to_owned(), | ||
changed_amount: item.amount, | ||
kind: "DIRECTDEBIT".to_string(), |
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.
Create an enum for this
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.
Done
let resource_id = ResponseId::ConnectorTransactionId( | ||
item.response | ||
.tx_id | ||
.ok_or(errors::ConnectorError::MissingConnectorTransactionID)?, |
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.
same here
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.
Done
type Error = error_stack::Report<errors::ConnectorError>; | ||
fn try_from(_item: &PaymentsCancelRouterData) -> Result<Self, Self::Error> { | ||
Ok(Self { | ||
kind: "DIRECTDEBIT".to_string(), |
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.
Move it the same enum as above
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.
Done
fn try_from(item: &DeutschebankRouterData<&RefundsRouterData<F>>) -> Result<Self, Self::Error> { | ||
Ok(Self { | ||
changed_amount: item.amount.to_owned(), | ||
kind: "DIRECTDEBIT".to_string(), |
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.
same here
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.
Done
let connector_refund_id = item | ||
.response | ||
.tx_id | ||
.ok_or(errors::ConnectorError::MissingConnectorRefundID)?; |
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.
same here
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.
Done
c42dffc
* 'main' of github.com:juspay/hyperswitch: (51 commits) feat(connector): [DEUTSCHEBANK] Integrate SEPA Payments (#5826) feat(payments_v2): payment intent diesel and domain models changes v2 (#5783) feat(connector): [Fiuu] ADD Wasm Configs (#5874) chore(version): 2024.09.13.0 refactor(core): Update shipping_cost and order_tax_amount to net_amount of payment_attempt (#5844) refactor: return optional request body from build_request_v2 in ConnectorIntegrationV2 trait (#5865) feat(refunds): Refunds aggregate api (#5795) refactor: handle redirections for iframed content (#5591) refactor(payment_links): Update API contract for dynamic transaction details and upgrade UI (#5849) fix(router): add payment_method check in `get_mandate_type` (#5828) fix(connector): [ZSL] compare consr_paid_amt with the total amount for identifying partial payments (#5873) feat(connector): [Novalnet] add Payment flows for cards (#5726) chore(version): 2024.09.12.0 fix(router): return `collect_billing_details_from_wallet_connector` if `always_collect_billing_details_from_wallet_connector ` is false in merchant payment method list (#5854) feat(opensearch): add profile_id and organization_id to /search APIs (#5705) build(deps): bump `sqlx` to `0.8.2` (#5859) refactor: Remove unwanted commented lines (#5851) feat(payments): add support for profile aggregates (#5845) Feat(connector): [Fiuu] Add DuitNow/FPX PaymentMethod (#5841) chore: remove Connectors enum dependency from ConnectorIntegrationV2 trait (#5840) ...
Type of Change
Description
Integrate SEPA Payments for connector Deutsche Bank
https://testmerch.directpos.de/rest-api/apidoc/v2.1/index.html#chap_sdd
Additional Changes
Motivation and Context
#5858
How did you test it?
Request:
Response:
Then do redirection
Request:
Response:
Request:
Response:
Request:
Response:
Request:
Response:
Request:
Response:
Checklist
cargo +nightly fmt --all
cargo clippy