fix(core): add merchant_id to gpay merchant info (#2170)

This commit is contained in:
SamraatBansal
2023-09-18 15:17:12 +05:30
committed by GitHub
parent 6a64180617
commit 5643ecf075
3 changed files with 11 additions and 2 deletions

View File

@ -2317,7 +2317,10 @@ pub struct GpayTransactionInfo {
#[derive(Debug, Clone, Eq, PartialEq, serde::Serialize, serde::Deserialize, ToSchema)] #[derive(Debug, Clone, Eq, PartialEq, serde::Serialize, serde::Deserialize, ToSchema)]
pub struct GpayMerchantInfo { pub struct GpayMerchantInfo {
/// The name of the merchant /// The merchant Identifier that needs to be passed while invoking Gpay SDK
#[serde(skip_serializing_if = "Option::is_none")]
pub merchant_id: Option<String>,
/// The name of the merchant that needs to be displayed on Gpay PopUp
pub merchant_name: String, pub merchant_name: String,
} }

View File

@ -1142,6 +1142,7 @@ impl From<GooglePayTransactionInfo> for api_models::payments::GpayTransactionInf
impl From<GooglePayMerchantInfo> for api_models::payments::GpayMerchantInfo { impl From<GooglePayMerchantInfo> for api_models::payments::GpayMerchantInfo {
fn from(value: GooglePayMerchantInfo) -> Self { fn from(value: GooglePayMerchantInfo) -> Self {
Self { Self {
merchant_id: None,
merchant_name: value.merchant_name, merchant_name: value.merchant_name,
} }
} }

View File

@ -5537,9 +5537,14 @@
"merchant_name" "merchant_name"
], ],
"properties": { "properties": {
"merchant_id": {
"type": "string",
"description": "The merchant Identifier that needs to be passed while invoking Gpay SDK",
"nullable": true
},
"merchant_name": { "merchant_name": {
"type": "string", "type": "string",
"description": "The name of the merchant" "description": "The name of the merchant that needs to be displayed on Gpay PopUp"
} }
} }
}, },