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): migrate payment_method_data to rust locker only if payment_method is card #2931

Merged
merged 3 commits into from
Nov 21, 2023

Conversation

ShankarSinghC
Copy link
Contributor

@ShankarSinghC ShankarSinghC commented Nov 21, 2023

Type of Change

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

Description

This pr is to have a change that will migrate payment_method_data to rust locker only is the payment_method is crad. This change is required because only cards were added to Basilisk HS.
Also this includes changes to just log error instead of propagating it if add card to rust locker fails, this is done as part of fallback where we will be adding the card to Basilisk HS also.
#2929

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?

VAS compiling for v1.74.0
image

Screenshot 2023-11-21 at 3 27 33 PM Screenshot 2023-11-21 at 3 27 57 PM Screenshot 2023-11-21 at 3 41 44 PM Screenshot 2023-11-18 at 2 28 28 AM

Make a request with the below curl for a merchant_id which has saved card and also some other payment method saved. After the migration it should just migrate payment method data for only cards this can be verified by api response which gives the number of cards moved.

curl --location --request POST 'http://localhost:8080/locker_migration/merchant_1699604009' \
--header 'api-key: test_admin' \
--header 'Cookie: JSESSIONID.130f0e8f=node01ix1y16yw8z3v1m3nwkr4qbiwb6.node0'

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

@ShankarSinghC ShankarSinghC added A-core Area: Core flows S-waiting-on-review Status: This PR has been implemented and needs to be reviewed A-payment-methods Area: Payment Methods labels Nov 21, 2023
@ShankarSinghC ShankarSinghC added this to the November 2023 Release milestone Nov 21, 2023
@ShankarSinghC ShankarSinghC self-assigned this Nov 21, 2023
@ShankarSinghC ShankarSinghC requested a review from a team as a code owner November 21, 2023 10:37
NishantJoshi00
NishantJoshi00 previously approved these changes Nov 21, 2023
Gnanasundari24
Gnanasundari24 previously approved these changes Nov 21, 2023
SanchithHegde
SanchithHegde previously approved these changes Nov 21, 2023
crates/router/src/core/locker_migration.rs Outdated Show resolved Hide resolved
@SanchithHegde SanchithHegde merged commit b6251fa into hotfix-1.84.0 Nov 21, 2023
9 of 13 checks passed
@SanchithHegde SanchithHegde deleted the refactor-locker-migration-hotfix branch November 21, 2023 15:31
@SanchithHegde SanchithHegde removed the S-waiting-on-review Status: This PR has been implemented and needs to be reviewed label Nov 21, 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 A-payment-methods Area: Payment Methods
Projects
No open projects
Status: Merged
Development

Successfully merging this pull request may close these issues.

6 participants