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 duplication_check field in stored card response #59

Merged
merged 12 commits into from
Jan 29, 2024

Conversation

ShankarSinghC
Copy link
Contributor

@ShankarSinghC ShankarSinghC commented Dec 13, 2023

This pr is to add duplication_check field in stored card response. This field can have three values (duplicated, meta_data_changed and null).

duplicated : indicates that the entire card details in the card request is already present in the locker.
meta_data_changed : indicates that there is already a saved card with same card number but with different card details (like cvv, expiry or card holder name).
null : indicates that is not present in the locker.

Test Case :-
-> Add a new card
Screenshot 2023-12-13 at 3 34 50 PM
-> Try to add a card which is already present
Screenshot 2023-12-13 at 3 35 11 PM
-> Try to add a card which is already present but this time with updated card data (except card number)
Screenshot 2023-12-13 at 3 35 28 PM
Tested the change with hyperswitch main for backwards compatibility
-> create payment method
image
-> list customer
image
-> payment create with saved card
image

@ShankarSinghC ShankarSinghC self-assigned this Dec 13, 2023
Copy link
Member

@NishantJoshi00 NishantJoshi00 left a comment

Choose a reason for hiding this comment

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

Other than that, looks good!

src/routes/data.rs Outdated Show resolved Hide resolved
src/routes/data/transformers.rs Outdated Show resolved Hide resolved
src/routes/data/transformers.rs Outdated Show resolved Hide resolved
src/routes/data/types.rs Outdated Show resolved Hide resolved
@NishantJoshi00 NishantJoshi00 merged commit 358cdb8 into main Jan 29, 2024
3 checks passed
@NishantJoshi00 NishantJoshi00 deleted the add-duplication-check branch January 29, 2024 10:49
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.

[FEATURE] Return is_duplicate field while the store card request, in case of duplication
3 participants