-
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(payment_methods_v2): Added Ephemeral auth for v2 #6813
Conversation
.change_context(errors::ApiErrorResponse::InvalidRequestData { | ||
message: format!("`{}` header is invalid", headers::X_RESOURCE_TYPE), | ||
})? | ||
.get_required_value("ResourceType") |
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.
is this always tied to a customer? we might create the ephemeral key for payment as well right?
@@ -826,7 +815,7 @@ pub struct PaymentMethodResponse { | |||
pub last_used_at: Option<time::PrimitiveDateTime>, | |||
|
|||
/// For Client based calls | |||
pub client_secret: Option<String>, | |||
pub ephemeral_key: Option<String>, |
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.
Can we have this as a Secret
?
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.
Dashboard specific changes looks fine.
couple of doubts in this PR @Sarthak1799, we are using ephemeral key without any merchant authentication part i.e publishable key. Should we add ephemeral key along with publishable key? Also, the create payment method s2s call also creates a ephemeral key in the response, what is the use for this? If there has to be any client interactions, the merchant has to create the ephemeral key separately right? cc: @jarnura |
The Create API also should be able to provide a ephemeral key in case the the merchant wants to use the SDK post vaulting right?
Publishible key support is also there for the respective APIs. Merchant authentication is there in Ephemeral key as well. The case where someone would be able to use another merchant's ephemeral key is seems unlikely. |
…ete-pm * 'main' of github.com:juspay/hyperswitch: chore(version): 2024.12.23.0 feat(connector): [JPMORGAN] add Payment flows for cards (#6668) refactor(grpc): send `x-tenant-id` and `x-request-id` in grpc headers (#6904) feat(payment_methods_v2): Added Ephemeral auth for v2 (#6813) chore(cypress): payout - fix test cases for adyenplatform bank (#6887) refactor(connector): [Airwallex] add device_data in payment request (#6881) feat(router): add db interface for `/relay` (#6879) feat(payments_v2): implement payments capture v2 (#6722) feat(router): add /relay endpoint (#6870)
Type of Change
Description
This PR contains -
Additional Changes
Motivation and Context
How did you test it?
Response
Response -
Response -
Response -
Response -
Response -
Can use the ephemeral key obtained here to hit the above APIs
Checklist
cargo +nightly fmt --all
cargo clippy