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

fix(router): associate parent payment token with payment_method_id as hyperswitch token for saved cards #2130

Merged
merged 19 commits into from
Nov 20, 2023

Conversation

vspecky
Copy link
Member

@vspecky vspecky commented Sep 12, 2023

Type of Change

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

Description

This PR implements some missing components of #2073 , mainly the logic to associate the generated parent payment token with the payment_method_id as opposed to a randomly generated temp locker token in the saved cards flow, so a call can be made directly to the persistent locker to fetch card details.

Additional Changes

None

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

Motivation and Context

Due to the missing association between parent payment token and the payment method id as hyperswitch token for saved cards, the saved cards flow had some potential issues which needed to be addressed.

How did you test it?

Local testing of happy flows and edge cases, compiler-guided.

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

@vspecky vspecky added C-bug Category: Bug S-waiting-on-review Status: This PR has been implemented and needs to be reviewed A-payment-methods Area: Payment Methods R-waiting-on-L1 labels Sep 12, 2023
@vspecky vspecky requested a review from a team as a code owner September 12, 2023 10:52
@vspecky vspecky self-assigned this Sep 12, 2023
@vspecky vspecky requested review from a team and ashokkjag as code owners September 12, 2023 10:52
@vspecky vspecky marked this pull request as draft September 12, 2023 10:52
@vspecky vspecky marked this pull request as ready for review September 13, 2023 13:19
Copy link
Member

@jarnura jarnura left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing leave this comments,

@vspecky vspecky requested a review from jarnura September 20, 2023 06:56
jarnura
jarnura previously approved these changes Sep 20, 2023
Sarthak1799
Sarthak1799 previously approved these changes Sep 20, 2023
@vspecky vspecky dismissed stale reviews from Sarthak1799 and jarnura via 3646fca October 10, 2023 09:31
Sarthak1799
Sarthak1799 previously approved these changes Oct 12, 2023
jarnura
jarnura previously approved these changes Oct 17, 2023
@vspecky
Copy link
Member Author

vspecky commented Nov 7, 2023

Test Case :-

  1. Saved cards flow should succeed
  2. Temporary tokenization flow should succeed (card details given during Payments Create, then Payment Token given during Confirm)

@Sarthak1799
Copy link
Contributor

Could you resolve the conflicts on the linked PR?

@preetamrevankar preetamrevankar added this pull request to the merge queue Nov 20, 2023
Merged via the queue into main with commit efeebc0 Nov 20, 2023
@preetamrevankar preetamrevankar deleted the locker-id-as-hyps-token-for-cards branch November 20, 2023 11:00
@SanchithHegde SanchithHegde removed S-waiting-on-review Status: This PR has been implemented and needs to be reviewed R-waiting-on-L1 labels Nov 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-payment-methods Area: Payment Methods C-bug Category: Bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants