Skip to content

fix(router): [worldpayvantiv] dispute validations and statuses #8862

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

Merged
merged 6 commits into from
Aug 7, 2025

Conversation

AkshayaFoiger
Copy link
Contributor

@AkshayaFoiger AkshayaFoiger commented Aug 6, 2025

Type of Change

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

Description

  1. Allow Accept Liability/ Submit Evidence during pre-arbitration and when the dispute is in challenge state
  2. Remove the list_dispute_supported_connectors flag from prod as vantiv's prod url for the same is unknow
  3. Extensively handle the dispute status from vantiv

How did you test it?

Accept liability for a challenged dispute

curl --location --request POST 'http://localhost:8080/disputes/accept/dp_VqlX1fzaUZRUmnMhcruo' \
--header 'Accept: application/json' \
--header 'api-key: dev_nGgYoHlpzKHfrpHfI9hAX8BOctOASqkCX8RCMglZ5Ro5BhLGmczY0WjoD1udVuDh'

Response

{"dispute_id":"dp_uSGRmdV28ok7AG4CBgm4","payment_id":"12345","attempt_id":"12345_1","amount":"52000","currency":"USD","dispute_stage":"pre_arbitration","dispute_status":"dispute_challenged","connector":"worldpayvantiv","connector_status":"Pre-Arbitration","connector_dispute_id":"10193081007","connector_reason":"Collaboration Flow - Processing Error - Duplicate Processing","connector_reason_code":"12.6.1","challenge_required_by":"2026-07-10T00:00:00.000Z","connector_created_at":"2025-07-10T00:00:00.000Z","connector_updated_at":null,"created_at":"2025-08-06T18:17:47.052Z","profile_id":"pro_TBRJM4Wv6IWCco5U7SmU","merchant_connector_id":"mca_g7Vm6N4QDsht1Os6gZ7j"}

Do a Dsync

{"dispute_id":"dp_uSGRmdV28ok7AG4CBgm4","payment_id":"12345","attempt_id":"12345_1","amount":"52000","currency":"USD","dispute_stage":"pre_arbitration","dispute_status":"dispute_accepted","connector":"worldpayvantiv","connector_status":"Pre-Arbitration","connector_dispute_id":"10193081007","connector_reason":"Collaboration Flow - Processing Error - Duplicate Processing","connector_reason_code":"12.6.1","challenge_required_by":"2026-07-10T00:00:00.000Z","connector_created_at":"2025-07-10T00:00:00.000Z","connector_updated_at":null,"created_at":"2025-08-06T18:17:47.052Z","profile_id":"pro_TBRJM4Wv6IWCco5U7SmU","merchant_connector_id":"mca_g7Vm6N4QDsht1Os6gZ7j"}

Cannot create a successful submit evidence call because of the test case unavailablity

Try submitting evidence to a challenged dispute

{"dispute_id":"dp_uSGRmdV28ok7AG4CBgm4","payment_id":"12345","attempt_id":"12345_1","amount":"52000","currency":"USD","dispute_stage":"pre_arbitration","dispute_status":"dispute_challenged","connector":"worldpayvantiv","connector_status":"Pre-Arbitration","connector_dispute_id":"10193081007","connector_reason":"Collaboration Flow - Processing Error - Duplicate Processing","connector_reason_code":"12.6.1","challenge_required_by":"2026-07-10T00:00:00.000Z","connector_created_at":"2025-07-10T00:00:00.000Z","connector_updated_at":null,"created_at":"2025-08-06T18:17:47.052Z","profile_id":"pro_TBRJM4Wv6IWCco5U7SmU","merchant_connector_id":"mca_g7Vm6N4QDsht1Os6gZ7j"}

Response

{"dispute_id":"dp_uSGRmdV28ok7AG4CBgm4","payment_id":"12345","attempt_id":"12345_1","amount":"52000","currency":"USD","dispute_stage":"pre_arbitration","dispute_status":"dispute_challenged","connector":"worldpayvantiv","connector_status":"Pre-Arbitration","connector_dispute_id":"10193081007","connector_reason":"Collaboration Flow - Processing Error - Duplicate Processing","connector_reason_code":"12.6.1","challenge_required_by":"2026-07-10T00:00:00.000Z","connector_created_at":"2025-07-10T00:00:00.000Z","connector_updated_at":null,"created_at":"2025-08-06T18:17:47.052Z","profile_id":"pro_TBRJM4Wv6IWCco5U7SmU","merchant_connector_id":"mca_g7Vm6N4QDsht1Os6gZ7j"}

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 review from a team as code owners August 6, 2025 18:44
Copy link

semanticdiff-com bot commented Aug 6, 2025

Review changes with  SemanticDiff

Changed Files
File Status
  crates/router/src/core/disputes.rs  67% smaller
  crates/router/src/core/utils.rs  38% smaller
  crates/hyperswitch_connectors/src/connectors/worldpayvantiv/transformers.rs  35% smaller
  config/deployments/production.toml Unsupported file format

@AkshayaFoiger AkshayaFoiger self-assigned this Aug 6, 2025
@AkshayaFoiger AkshayaFoiger added A-connector-integration Area: Connector integration A-disputes Area: Dispute flows labels Aug 6, 2025
@AkshayaFoiger AkshayaFoiger changed the title feat(router): [worldpayvantiv] fix the dispute validations and statuses fix(router): [worldpayvantiv] dispute validations and statuses Aug 6, 2025
@likhinbopanna likhinbopanna added this pull request to the merge queue Aug 7, 2025
Merged via the queue into main with commit 1b2a98c Aug 7, 2025
21 of 26 checks passed
@likhinbopanna likhinbopanna deleted the accept-dispute branch August 7, 2025 08:13
pixincreate added a commit that referenced this pull request Aug 7, 2025
…ordea-sepa

* 'main' of github.com:juspay/hyperswitch:
  fix(router): [worldpayvantiv] dispute validations and statuses (#8862)
  chore(version): 2025.08.07.0
  feat(connector): [WORLDPAYVANTIV] Populate Network Decline Error Code & Message (#8856)
  feat(router): add support for partial authorization (#8833)
  feat(gRPC): build gRPC client interface to initiate communication with recovery-decider service (#8178)
  fix(connector): [CYBERSOURCE] fix response field for netcetera authentication response (#8850)
  chore(events): making events nanosecond level precision (#8759)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-connector-integration Area: Connector integration A-disputes Area: Dispute flows
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants