mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-29 09:07:09 +08:00
feat(core): accept payment_confirm_source header in capture call and store in payment_intent (#2116)
This commit is contained in:
@ -124,7 +124,7 @@ pub struct PaymentsRequest {
|
||||
pub currency: Option<api_enums::Currency>,
|
||||
|
||||
/// This is the instruction for capture/ debit the money from the users' card. On the other hand authorization refers to blocking the amount on the users' payment method.
|
||||
#[schema(value_type = Option<CaptureMethod>, example = "PaymentProcessor")]
|
||||
#[schema(value_type = Option<CaptureMethod>, example = "automatic")]
|
||||
pub capture_method: Option<api_enums::CaptureMethod>,
|
||||
|
||||
/// The Amount to be captured/ debited from the users payment method. It shall be in lowest denomination of the currency. (i.e) in cents for USD denomination, in paisa for INR denomination etc.,
|
||||
@ -300,6 +300,11 @@ pub struct PaymentsRequest {
|
||||
pub profile_id: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Default, Debug, Clone, Copy)]
|
||||
pub struct HeaderPayload {
|
||||
pub payment_confirm_source: Option<api_enums::PaymentSource>,
|
||||
}
|
||||
|
||||
#[derive(
|
||||
Default, Debug, serde::Serialize, Clone, PartialEq, ToSchema, router_derive::PolymorphicSchema,
|
||||
)]
|
||||
@ -1775,7 +1780,7 @@ pub struct PaymentsResponse {
|
||||
pub capture_on: Option<PrimitiveDateTime>,
|
||||
|
||||
/// This is the instruction for capture/ debit the money from the users' card. On the other hand authorization refers to blocking the amount on the users' payment method.
|
||||
#[schema(value_type = Option<CaptureMethod>, example = "PaymentProcessor")]
|
||||
#[schema(value_type = Option<CaptureMethod>, example = "automatic")]
|
||||
pub capture_method: Option<api_enums::CaptureMethod>,
|
||||
|
||||
/// The payment method that is to be used
|
||||
|
||||
Reference in New Issue
Block a user