Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix(connector): [ZSL] compare consr_paid_amt with the total amount for identifying partial payments #5873

Merged
merged 1 commit into from
Sep 12, 2024

Conversation

AkshayaFoiger
Copy link
Contributor

@AkshayaFoiger AkshayaFoiger commented Sep 12, 2024

Type of Change

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

Description

ZSL implements bank transfer payment, so the payment status is updated through webhooks.
Their webhook body has two fields for indicating the paid amount - paid_amt and consr_paid_amt we compared
paid_amt with total amount to identify the partial/over payments. But the field for what user paid is given in consr_paid_amt and what they will pay the merchant after fee is given in paid_amt.
In this Pr we are fixing this issue.

How did you test it?

As we cannot trigger the webhooks, we cannot test it in sandbox

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

@AkshayaFoiger AkshayaFoiger requested a review from a team as a code owner September 12, 2024 10:06
Copy link

semanticdiff-com bot commented Sep 12, 2024

Review changes with SemanticDiff.

Analyzed 1 of 1 files.

Overall, the semantic diff is 45% smaller than the GitHub diff.

Filename Status
✔️ crates/router/src/connector/zsl/transformers.rs 44.84% smaller

@AkshayaFoiger AkshayaFoiger self-assigned this Sep 12, 2024
@AkshayaFoiger AkshayaFoiger added A-connector-compatibility Area: Connector compatibility A-connector-integration Area: Connector integration C-bug Category: Bug labels Sep 12, 2024
@Gnanasundari24 Gnanasundari24 added this pull request to the merge queue Sep 12, 2024
Merged via the queue into main with commit 985761c Sep 12, 2024
17 of 18 checks passed
@Gnanasundari24 Gnanasundari24 deleted the fix-zsl-webhook branch September 12, 2024 11:56
AkshayaFoiger added a commit that referenced this pull request Sep 13, 2024
pixincreate added a commit that referenced this pull request Sep 13, 2024
* '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)
  ...
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-connector-compatibility Area: Connector compatibility A-connector-integration Area: Connector integration C-bug Category: Bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants