feat(router): add unified_code, unified_message in payments response (#2918)

This commit is contained in:
Sai Harsha Vardhan
2023-11-20 17:35:07 +05:30
committed by GitHub
parent efeebc0f23
commit 39540015fd
20 changed files with 242 additions and 45 deletions

View File

@ -13,6 +13,8 @@ pub struct GsmCreateRequest {
pub router_error: Option<String>,
pub decision: GsmDecision,
pub step_up_possible: bool,
pub unified_code: Option<String>,
pub unified_message: Option<String>,
}
#[derive(Debug, serde::Deserialize, serde::Serialize, ToSchema)]
@ -57,6 +59,8 @@ pub struct GsmUpdateRequest {
pub router_error: Option<String>,
pub decision: Option<GsmDecision>,
pub step_up_possible: Option<bool>,
pub unified_code: Option<String>,
pub unified_message: Option<String>,
}
#[derive(Debug, serde::Deserialize, serde::Serialize, ToSchema)]
@ -88,4 +92,6 @@ pub struct GsmResponse {
pub router_error: Option<String>,
pub decision: String,
pub step_up_possible: bool,
pub unified_code: Option<String>,
pub unified_message: Option<String>,
}

View File

@ -391,6 +391,10 @@ pub struct PaymentAttemptResponse {
/// reference to the payment at connector side
#[schema(value_type = Option<String>, example = "993672945374576J")]
pub reference_id: Option<String>,
/// error code unified across the connectors is received here if there was an error while calling connector
pub unified_code: Option<String>,
/// error message unified across the connectors is received here if there was an error while calling connector
pub unified_message: Option<String>,
}
#[derive(
@ -2089,6 +2093,12 @@ pub struct PaymentsResponse {
#[schema(example = "Failed while verifying the card")]
pub error_message: Option<String>,
/// error code unified across the connectors is received here if there was an error while calling connector
pub unified_code: Option<String>,
/// error message unified across the connectors is received here if there was an error while calling connector
pub unified_message: Option<String>,
/// Payment Experience for the current payment
#[schema(value_type = Option<PaymentExperience>, example = "redirect_to_url")]
pub payment_experience: Option<api_enums::PaymentExperience>,