-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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 endpoint for listing connector features #6612
Merged
Conversation
This file contains 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
AkshayaFoiger
added
C-feature
Category: Feature request or enhancement
C-refactor
Category: Refactor
M-api-contract-changes
Metadata: This PR involves API contract changes
labels
Nov 19, 2024
AkshayaFoiger
changed the title
feat(router): add an api for listing connector features and add a payment method function
feat(router): add endpoint for listing connector features
Nov 19, 2024
hyperswitch-bot
bot
removed
the
M-api-contract-changes
Metadata: This PR involves API contract changes
label
Nov 19, 2024
Narayanbhat166
requested changes
Nov 20, 2024
pixincreate
reviewed
Dec 20, 2024
Co-authored-by: Pa1NarK <[email protected]>
Narayanbhat166
previously approved these changes
Dec 20, 2024
pixincreate
previously approved these changes
Dec 20, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ci changes look good
apoorvdixit88
previously approved these changes
Dec 20, 2024
jarnura
previously approved these changes
Dec 23, 2024
pixincreate
added
the
S-needs-conflict-resolution
Status: This PR needs conflicts to be resolved by the author
label
Dec 23, 2024
AkshayaFoiger
dismissed stale reviews from jarnura, apoorvdixit88, pixincreate, and Narayanbhat166
via
December 23, 2024 07:58
954fa23
Narayanbhat166
approved these changes
Dec 23, 2024
deepanshu-iiitu
approved these changes
Dec 23, 2024
pixincreate
approved these changes
Dec 23, 2024
jarnura
approved these changes
Dec 23, 2024
apoorvdixit88
approved these changes
Dec 23, 2024
AkshayaFoiger
removed
the
S-needs-conflict-resolution
Status: This PR needs conflicts to be resolved by the author
label
Dec 24, 2024
pixincreate
added a commit
to Ankesh2004/hyperswitch
that referenced
this pull request
Dec 26, 2024
…r-verifyurl-in-redirection-handler * 'main' of github.com:juspay/hyperswitch: (444 commits) ci: add tests that make use of locker (juspay#6735) chore(version): 2024.12.26.1 fix(router): populate `profile_id` in for the HeaderAuth of v1 (juspay#6936) docs(openapi): update /relay request example (juspay#6942) chore(version): 2024.12.26.0 fix(payments_list): handle same payment/attempt ids for different merchants (juspay#6917) refactor(core): remove merchant return url from `router_data` (juspay#6895) feat(router): add endpoint for listing connector features (juspay#6612) fix(wasm): remove chasenet from jpmorgan wasm as ChaseNet doesn’t exist in PMT (juspay#6927) fix(cors): expose all headers set by application in `access-control-expose-headers` header value (juspay#6877) chore(version): 2024.12.24.0 feat(cypress): valdiate `error_code` and `error_message` and make it visible in `reports` (juspay#6913) fix(wasm): remove extra space from wasm for payment_method_type of JPMorgan (juspay#6923) fix(wasm): fix feature dependencies in `connector_configs` crate for WASM builds (juspay#6832) feat(router): add /retrieve api for relay (juspay#6918) feat(core): implemented platform merchant account (juspay#6882) feat(payments_v2): add payment method list endpoint (juspay#6805) fix(connector): [Cybersource] fix the required fields for wallet mandate payments (juspay#6911) chore(version): 2024.12.23.0 feat(connector): [JPMORGAN] add Payment flows for cards (juspay#6668) ...
pixincreate
added a commit
to Ankesh2004/hyperswitch
that referenced
this pull request
Dec 26, 2024
…r-verifyurl-in-redirection-handler * 'main' of github.com:juspay/hyperswitch: (444 commits) ci: add tests that make use of locker (juspay#6735) chore(version): 2024.12.26.1 fix(router): populate `profile_id` in for the HeaderAuth of v1 (juspay#6936) docs(openapi): update /relay request example (juspay#6942) chore(version): 2024.12.26.0 fix(payments_list): handle same payment/attempt ids for different merchants (juspay#6917) refactor(core): remove merchant return url from `router_data` (juspay#6895) feat(router): add endpoint for listing connector features (juspay#6612) fix(wasm): remove chasenet from jpmorgan wasm as ChaseNet doesn’t exist in PMT (juspay#6927) fix(cors): expose all headers set by application in `access-control-expose-headers` header value (juspay#6877) chore(version): 2024.12.24.0 feat(cypress): valdiate `error_code` and `error_message` and make it visible in `reports` (juspay#6913) fix(wasm): remove extra space from wasm for payment_method_type of JPMorgan (juspay#6923) fix(wasm): fix feature dependencies in `connector_configs` crate for WASM builds (juspay#6832) feat(router): add /retrieve api for relay (juspay#6918) feat(core): implemented platform merchant account (juspay#6882) feat(payments_v2): add payment method list endpoint (juspay#6805) fix(connector): [Cybersource] fix the required fields for wallet mandate payments (juspay#6911) chore(version): 2024.12.23.0 feat(connector): [JPMORGAN] add Payment flows for cards (juspay#6668) ...
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
C-feature
Category: Feature request or enhancement
C-refactor
Category: Refactor
M-api-contract-changes
Metadata: This PR involves API contract changes
M-configuration-changes
Metadata: This PR involves configuration changes
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
-> Why?
With new features being added, it is becoming increasingly difficult to track all the additions. This information is essential for accurately representing Hyperswitch's offerings. Having this solution will eliminate inconsistencies between the documentation and the actual implementation, ensuring clarity and alignment.
-> What?
Introduce an API endpoint that provides:
-> A list of all connectors.
-> The payment methods supported by each connector.
-> The status of these payment methods.
-> Features supported by the connector
-> How?
-> ConnectorSpecifications Connector trait :
Function in this trait, will provide all the connector specific details like payment methods supported, refunds supported and etc.
-> Pre-validation for Payment Methods
Before invoking a connector to process a payment, this function will check if the specified payment_method is implemented, using the data provided in the ConnectorSpecifications trait. This ensures developers update the relevant functions during development and testing.
-> Unified API Endpoint:
Build an endpoint that collects information from all connectors and consolidates it into a unified JSON response. This will act as a single source of truth for supported features.
Additionally, this PR
Additional Changes
How did you test it?
Test the validation.
Create a Klarna payment with Bambora. It should fail with "payment method not supported" error.
Response
The payment intent status will be
requires_payment_method
Response
List for all connector (that implements this feature)
Response
Additional,
Create a Automatic/SequentialAutomatic payment with deutsche bank
Response
Psync Response
Create a manual payment with deutsche bank
Response
Capture
Response
Create a automatic payment with ZSL
Response
Checklist
cargo +nightly fmt --all
cargo clippy