hyperswitch icon indicating copy to clipboard operation
hyperswitch copied to clipboard

feat(connector): [JPMORGAN] Add Integrity Check Support for Authorize, PSync, Refund and RSync Flows

Open suraj-mandal opened this issue 2 months ago • 3 comments

Type of Change

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

Description

Added integrity check support for Authorize, Capture, Refund, PSync, and RSync flows for the JPMorgan connector. Also added the fields amount and currency for JpmorganPaymentsResponse struct.

What is an integrity check? A scenario where there is a discrepancy between the amount sent in the request and the amount received from the connector, which is checked during response handling.

Additional Changes

  • [ ] This PR modifies the API contract
  • [ ] This PR modifies the database schema
  • [ ] This PR modifies application configuration/environment variables

Fixes #9188

Motivation and Context

This Pr holds the payment in a non-terminal state in case there is any data discrepancy in the above flows.

How did you test it?

Checklist

  • [x] I formatted the code cargo +nightly fmt --all
  • [x] I addressed lints thrown by cargo clippy
  • [x] I reviewed the submitted code
  • [ ] I added unit tests for my changes where possible

suraj-mandal avatar Nov 01 '25 20:11 suraj-mandal

Review changes with  SemanticDiff

Changed Files
File Status
  crates/hyperswitch_connectors/src/connectors/jpmorgan.rs  11% smaller
  crates/hyperswitch_connectors/src/connectors/jpmorgan/transformers.rs  2% smaller

semanticdiff-com[bot] avatar Nov 01 '25 20:11 semanticdiff-com[bot]

@bsayak03 , @neerajkumar-n , I have added a PR for the JPmorgan one. Kindly check!

suraj-mandal avatar Nov 01 '25 20:11 suraj-mandal

@neerajkumar-n , can this PR be reviewed? It is long not checked!

suraj-mandal avatar Nov 07 '25 16:11 suraj-mandal