mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-29 00:49:42 +08:00
feat(connector): add support for surcharge in trustpay (#2581)
This commit is contained in:
@ -301,11 +301,21 @@ pub struct PaymentsRequest {
|
||||
/// associated with the merchant account will be used.
|
||||
pub profile_id: Option<String>,
|
||||
|
||||
/// surcharge_details for this payment
|
||||
#[schema(value_type = Option<RequestSurchargeDetails>)]
|
||||
pub surcharge_details: Option<RequestSurchargeDetails>,
|
||||
|
||||
/// The type of the payment that differentiates between normal and various types of mandate payments
|
||||
#[schema(value_type = Option<PaymentType>)]
|
||||
pub payment_type: Option<api_enums::PaymentType>,
|
||||
}
|
||||
|
||||
#[derive(Default, Debug, Clone, serde::Serialize, serde::Deserialize, Copy, ToSchema)]
|
||||
pub struct RequestSurchargeDetails {
|
||||
pub surcharge_amount: i64,
|
||||
pub tax_amount: Option<i64>,
|
||||
}
|
||||
|
||||
#[derive(Default, Debug, Clone, Copy)]
|
||||
pub struct HeaderPayload {
|
||||
pub payment_confirm_source: Option<api_enums::PaymentSource>,
|
||||
|
||||
Reference in New Issue
Block a user