Skip to content

Conversation

kashif-m
Copy link
Contributor

@kashif-m kashif-m commented Mar 7, 2024

Type of Change

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

Description

Explained in #3950

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?

Note - DM for postman collection

image

For ensuring card duplication is handled in payouts flow, we use below procedure (assuming merchant accounts and connector accounts are created)

  • Create a new customer
  • Save a card for this customer using /payment_methods endpoint
  • Create a new payout for this customer using the same card number
  • Payouts flow would try to persist these details in locker
  • Test # 1 - listing customer's PMs should return a single PM
  • Create a new payout using SPM
  • Payout flow would try to persist these details again
  • Test # 2 - listing customer's PMs should return a single PM
  • Try to save the same card details for this user using /payment_methods again
  • Test # 3 - listing customer's PMs should return a single PM

Above test cases are present in postman collection.

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

@kashif-m kashif-m requested a review from Chethan-rao March 7, 2024 16:47
@kashif-m kashif-m self-assigned this Mar 7, 2024
@kashif-m kashif-m linked an issue Mar 7, 2024 that may be closed by this pull request
@kashif-m kashif-m mentioned this pull request Mar 7, 2024
@kashif-m kashif-m marked this pull request as ready for review March 8, 2024 04:19
@kashif-m kashif-m requested a review from a team as a code owner March 8, 2024 04:19
Chethan-rao
Chethan-rao previously approved these changes Mar 8, 2024
@Chethan-rao Chethan-rao requested a review from vspecky March 8, 2024 11:06
sahkal
sahkal previously approved these changes Mar 21, 2024
sahkal
sahkal previously approved these changes Mar 23, 2024
Chethan-rao
Chethan-rao previously approved these changes Mar 30, 2024
@kashif-m kashif-m removed the request for review from vspecky April 1, 2024 08:08
@kashif-m kashif-m dismissed stale reviews from Chethan-rao and sahkal via 74ddaac April 4, 2024 09:11
@kashif-m kashif-m force-pushed the payout_card_dup_fix branch from 74ddaac to b6eabbb Compare April 4, 2024 09:20
@likhinbopanna likhinbopanna added this pull request to the merge queue Apr 5, 2024
Merged via the queue into main with commit 2fac436 Apr 5, 2024
@likhinbopanna likhinbopanna deleted the payout_card_dup_fix branch April 5, 2024 07:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[REFACTOR] handle payment method duplication in payouts
4 participants