feat(connector): add support for surcharge in trustpay (#2581)

This commit is contained in:
Hrithikesh
2023-10-16 14:30:43 +05:30
committed by GitHub
parent f43ed3c1b9
commit 2d5d3b8efb
10 changed files with 67 additions and 4 deletions

View File

@ -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>,