refactor: check allowed payment method types in enabled options#7019
Merged
likhinbopanna merged 4 commits intomainfrom Jan 21, 2025
Merged
refactor: check allowed payment method types in enabled options#7019likhinbopanna merged 4 commits intomainfrom
likhinbopanna merged 4 commits intomainfrom
Conversation
Changed Files
|
a783ba7 to
fad712c
Compare
Contributor
There was a problem hiding this comment.
do this validation before we create any database entities. I see that shipping and billing address are already created, and the payment_intent as well.
Contributor
There was a problem hiding this comment.
can we move this logic to an impl based on the MerchantConnectorAccount domain type and use it in both of the places?
Contributor
There was a problem hiding this comment.
can you move this to constants, also name it appropriately so as to know where all this can be used
Contributor
Author
There was a problem hiding this comment.
removing this as this const is not needed, we can directly use "merchant_id"
dgeee13
reviewed
Jan 14, 2025
f37301e to
1d1317c
Compare
4ade2f6 to
e409729
Compare
c9182ba to
9fbcc36
Compare
Narayanbhat166
previously approved these changes
Jan 16, 2025
dgeee13
previously approved these changes
Jan 16, 2025
ShankarSinghC
previously approved these changes
Jan 16, 2025
5f72a83
dgeee13
previously approved these changes
Jan 17, 2025
Narayanbhat166
previously approved these changes
Jan 17, 2025
ShankarSinghC
previously approved these changes
Jan 17, 2025
147237d
5f72a83 to
147237d
Compare
dgeee13
approved these changes
Jan 21, 2025
Narayanbhat166
approved these changes
Jan 21, 2025
ShankarSinghC
approved these changes
Jan 21, 2025
pixincreate
added a commit
that referenced
this pull request
Jan 24, 2025
…d-memory-cache * 'main' of github.com:juspay/hyperswitch: (38 commits) fix(cypress): uncaught exceptions thrown by `hyperswitch.io` (#7092) ci(workflows): Add code coverage reporting for v2 (#6884) chore(version): 2025.01.23.0 refactor: [CYBERSOURCE, BANKOFAMERICA, WELLSFARGO] Move code to crate hyperswitch_connectors (#6908) Documentation edits made through Mintlify web editor chore: enable 128-column-tables feature for diesel crate (#6857) feat(connector): [ADYEN ] Consume transaction id for PaymentsPreProcessing error (#7061) chore(version): 2025.01.22.0 feat(routing): Integrate global success rates (#6950) feat(email): Add mailhog by default in docker-compose for local smtp server (#6869) refactor: check allowed payment method types in enabled options (#7019) feat(router): add payment method-specific features to connector feature list (#6963) Refactor: Customer email and browser Information (#7034) feat(connectors): fiuu,novalnet,worldpay - extend NTI flows (#6946) fix(cypress): address cybersource redirection inconsistency (#7057) chore(version): 2025.01.21.0 refactor(payment-link): use shouldRemoveBeforeUnloadEvents flag for handling removal of beforeunload events through SDK (#7072) refactor(router): refactor ctp flow to fetch mca_id and get the connector creds instead of connector_name (#6859) chore(version): 2025.01.20.0 fix(relay): populate connector metadata in the refunds flow (#7045) ...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Type of Change
Description
Using values in allowed_payment_method_types that were not configured during the creation of the connector results in breaking the SDK flow which shows something went wrong, as the PML call returned an empty payment method list. We need to apply this check during intent creation call.
Additional Changes
Motivation and Context
How did you test it?
Tested manually by hitting payments create api.
Test cases-
Curl:
Checklist
cargo +nightly fmt --allcargo clippy