hyperswitch icon indicating copy to clipboard operation
hyperswitch copied to clipboard

feat(connectors): Add integrity check for PhonePe connector

Open Rxbber-dxcky opened this issue 3 months ago • 5 comments

Type of Change

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

Description

  • Added integrity checks for PhonePe connector responses
  • Implemented amount validation in authorize, refund, and sync flows
  • Added amount and currency fields to PhonepePaymentsResponse struct in phonepe/transformers.rs
  • Updated response handling to validate amounts against request
  • Fixes #9213

Additional Changes

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

Motivation and Context

  • Implements integrity checks for PhonePe connector as per issue #9213
  • Ensures response amounts match request amounts to prevent payment discrepancies

How did you test it?

pending

Checklist

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

Rxbber-dxcky avatar Sep 27 '25 16:09 Rxbber-dxcky

Review changes with  SemanticDiff

Changed Files
File Status
  crates/hyperswitch_connectors/src/connectors/phonepe/transformers.rs  63% smaller
  crates/hyperswitch_connectors/src/connectors/phonepe.rs  0% smaller

semanticdiff-com[bot] avatar Sep 27 '25 16:09 semanticdiff-com[bot]

@bsayak03, can you check on this PR and I am unable to build or test using cargo.

Rxbber-dxcky avatar Sep 29 '25 11:09 Rxbber-dxcky

@bsayak03, can i get a response on what to do ?

Rxbber-dxcky avatar Oct 05 '25 08:10 Rxbber-dxcky

@bsayak03, can i get a response on what to do ?

Currently in review. Will update you soon @Rxbber-dxcky

bsayak03 avatar Oct 05 '25 08:10 bsayak03

Thank you for your response, @bsayak03

Rxbber-dxcky avatar Oct 05 '25 15:10 Rxbber-dxcky