feat(frm): Add support to accept and decline payment when manually reviewed by merchant for risky transaction (#2071)

This commit is contained in:
Jagan
2023-09-04 17:44:39 +05:30
committed by GitHub
parent c5003aaa74
commit 229f111f6c
36 changed files with 1381 additions and 77 deletions

View File

@ -1908,6 +1908,9 @@ pub struct PaymentsResponse {
/// total number of attempts associated with this payment
pub attempt_count: i16,
/// Denotes the action(approve or reject) taken by merchant in case of manual review. Manual review can occur when the transaction is marked as risky by the frm_processor, payment processor or when there is underpayment/over payment incase of crypto payment
pub merchant_decision: Option<String>,
}
#[derive(Clone, Debug, serde::Deserialize, ToSchema)]
@ -2632,6 +2635,20 @@ pub struct PaymentsCancelRequest {
pub merchant_connector_details: Option<admin::MerchantConnectorDetailsWrap>,
}
#[derive(Default, Debug, serde::Deserialize, serde::Serialize, Clone, ToSchema)]
pub struct PaymentsApproveRequest {
/// The identifier for the payment
#[serde(skip)]
pub payment_id: String,
}
#[derive(Default, Debug, serde::Deserialize, serde::Serialize, Clone, ToSchema)]
pub struct PaymentsRejectRequest {
/// The identifier for the payment
#[serde(skip)]
pub payment_id: String,
}
#[derive(Default, Debug, serde::Deserialize, serde::Serialize, ToSchema, Clone)]
pub struct PaymentsStartRequest {
/// Unique identifier for the payment. This ensures idempotency for multiple payments