Skip to content
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(router): add unified_code, unified_message in payments response #2918

Merged

Conversation

sai-harsha-vardhan
Copy link
Contributor

@sai-harsha-vardhan sai-harsha-vardhan commented Nov 17, 2023

Type of Change

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

Description

add unified_code, unified_message in gsm, payment_attempt and payments_response

Currently we send error_code, error_message as connector's error code, message and this varies across connectors. To unify these errors, unified_code and unified_message are introduced which rely on GSM to retrieve the values based on connector, populate them in payment_attempt and send the same in payments response.

Additional Changes

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

Motivation and Context

How did you test it?

Tested Manually

  1. Create a failed payment with some connector to see unified_code, unified_message being null
    image

  2. Now update the relevant GSM by sending unified_code, unified_message with some valid values
    image

  3. Now re-create the same failed payment to see unified_code, unified_message being set to value based on GSM
    image

  4. Can verify the same unified_code, unified_message in payment_attempt record
    image

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
  • I added a CHANGELOG entry if applicable

@sai-harsha-vardhan sai-harsha-vardhan added A-core Area: Core flows C-feature Category: Feature request or enhancement S-waiting-on-review Status: This PR has been implemented and needs to be reviewed labels Nov 17, 2023
@sai-harsha-vardhan sai-harsha-vardhan self-assigned this Nov 17, 2023
@sai-harsha-vardhan sai-harsha-vardhan requested review from a team as code owners November 17, 2023 15:06
@sai-harsha-vardhan sai-harsha-vardhan changed the title feat(router): add unified_code, unified_message in gsm and payments_response feat(router): add unified_code, unified_message in payments_response Nov 17, 2023
@sai-harsha-vardhan sai-harsha-vardhan changed the title feat(router): add unified_code, unified_message in payments_response feat(router): add unified_code, unified_message in payments response Nov 17, 2023
@sai-harsha-vardhan sai-harsha-vardhan added M-database-changes Metadata: This PR involves database schema changes M-api-contract-changes Metadata: This PR involves API contract changes labels Nov 17, 2023
@Gnanasundari24 Gnanasundari24 added this pull request to the merge queue Nov 20, 2023
Merged via the queue into main with commit 3954001 Nov 20, 2023
14 of 16 checks passed
@Gnanasundari24 Gnanasundari24 deleted the add-unified-error-code-error-message-in-payments-response branch November 20, 2023 12:23
@SanchithHegde SanchithHegde removed the S-waiting-on-review Status: This PR has been implemented and needs to be reviewed label Nov 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-core Area: Core flows C-feature Category: Feature request or enhancement M-api-contract-changes Metadata: This PR involves API contract changes M-database-changes Metadata: This PR involves database schema changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants