Skip to content

Commit

Permalink
fix(core): add merchant_id to gpay merchant info (#2170)
Browse files Browse the repository at this point in the history
  • Loading branch information
SamraatBansal authored Sep 18, 2023
1 parent 6a64180 commit 5643ecf
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
5 changes: 4 additions & 1 deletion crates/api_models/src/payments.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2317,7 +2317,10 @@ pub struct GpayTransactionInfo {

#[derive(Debug, Clone, Eq, PartialEq, serde::Serialize, serde::Deserialize, ToSchema)]
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,
}

Expand Down
1 change: 1 addition & 0 deletions crates/router/src/connector/trustpay/transformers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1142,6 +1142,7 @@ impl From<GooglePayTransactionInfo> for api_models::payments::GpayTransactionInf
impl From<GooglePayMerchantInfo> for api_models::payments::GpayMerchantInfo {
fn from(value: GooglePayMerchantInfo) -> Self {
Self {
merchant_id: None,
merchant_name: value.merchant_name,
}
}
Expand Down
7 changes: 6 additions & 1 deletion openapi/openapi_spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -5537,9 +5537,14 @@
"merchant_name"
],
"properties": {
"merchant_id": {
"type": "string",
"description": "The merchant Identifier that needs to be passed while invoking Gpay SDK",
"nullable": true
},
"merchant_name": {
"type": "string",
"description": "The name of the merchant"
"description": "The name of the merchant that needs to be displayed on Gpay PopUp"
}
}
},
Expand Down

0 comments on commit 5643ecf

Please sign in to comment.