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(payment_methods): unmask last4 digits of card when listing payment methods for customer #3617

Merged
merged 1 commit into from
Feb 12, 2024

Conversation

Chethan-rao
Copy link
Contributor

@Chethan-rao Chethan-rao commented Feb 10, 2024

Type of Change

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

Description

When metadata of a saved card is updated and customer payment methods are listed, the updated card's last 4 digit is getting masked in the response. This PR unmasks it and returns the raw digits.

Bug: last4_digits is masked -

image

Fix: unmasked -

image

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?

  1. Save a card in locker
  2. Change the metadata of the saved card and try to save it again in locker
  3. Now when list_customer_payment_method is called, the last4_digits field of the updated card has to be unmasked

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

@Chethan-rao Chethan-rao 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 labels Feb 10, 2024
@Chethan-rao Chethan-rao added this to the February 2024 Release milestone Feb 10, 2024
@Chethan-rao Chethan-rao self-assigned this Feb 10, 2024
@Chethan-rao Chethan-rao requested a review from a team as a code owner February 10, 2024 16:51
@Gnanasundari24 Gnanasundari24 added this pull request to the merge queue Feb 12, 2024
Merged via the queue into main with commit 834142e Feb 12, 2024
10 of 12 checks passed
@Gnanasundari24 Gnanasundari24 deleted the fix-list-customer-pm branch February 12, 2024 08:01
@SanchithHegde SanchithHegde removed the S-waiting-on-review Status: This PR has been implemented and needs to be reviewed label Feb 18, 2024
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.

[BUG] unmask last4 digits of card when listing payment methods for customer
4 participants