From b301d09213a8c1c68d711a3b34227d13e61e52f9 Mon Sep 17 00:00:00 2001 From: Sai Harsha Vardhan <56996463+sai-harsha-vardhan@users.noreply.github.com> Date: Tue, 17 Dec 2024 17:19:56 +0530 Subject: [PATCH] chore(wasm): add wasm changes for ctp_mastercard connector (#6838) --- crates/connector_configs/src/common_config.rs | 5 ++ crates/connector_configs/src/connector.rs | 5 ++ .../connector_configs/toml/development.toml | 63 ++++++++++++++++++- crates/connector_configs/toml/sandbox.toml | 63 ++++++++++++++++++- 4 files changed, 134 insertions(+), 2 deletions(-) diff --git a/crates/connector_configs/src/common_config.rs b/crates/connector_configs/src/common_config.rs index 8f6e03fb3987..599d22ae3f67 100644 --- a/crates/connector_configs/src/common_config.rs +++ b/crates/connector_configs/src/common_config.rs @@ -102,6 +102,11 @@ pub struct ApiModelMetaData { pub source_balance_account: Option, pub brand_id: Option, pub destination_account_number: Option, + pub dpa_id: Option, + pub dpa_name: Option, + pub locale: Option, + pub card_brands: Option>, + pub merchant_category_code: Option, } #[serde_with::skip_serializing_none] diff --git a/crates/connector_configs/src/connector.rs b/crates/connector_configs/src/connector.rs index 7e893a6415e3..1af99f110208 100644 --- a/crates/connector_configs/src/connector.rs +++ b/crates/connector_configs/src/connector.rs @@ -114,6 +114,11 @@ pub struct ConfigMetadata { pub source_balance_account: Option, pub brand_id: Option, pub destination_account_number: Option, + pub dpa_id: Option, + pub dpa_name: Option, + pub locale: Option, + pub card_brands: Option>, + pub merchant_category_code: Option, } #[serde_with::skip_serializing_none] diff --git a/crates/connector_configs/toml/development.toml b/crates/connector_configs/toml/development.toml index 1f2062cdea3a..fcf0dca100cb 100644 --- a/crates/connector_configs/toml/development.toml +++ b/crates/connector_configs/toml/development.toml @@ -4373,4 +4373,65 @@ merchant_secret="Source verification key" [elavon.connector_auth.SignatureKey] api_key="Account Id" key1="User ID" -api_secret="Pin" \ No newline at end of file +api_secret="Pin" + +[ctp_mastercard] +[ctp_mastercard.connector_auth.HeaderKey] +api_key="API Key" + +[ctp_mastercard.metadata.dpa_id] +name="dpa_id" +label="DPA Id" +placeholder="Enter DPA Id" +required=true +type="Text" + +[ctp_mastercard.metadata.dpa_name] +name="dpa_name" +label="DPA Name" +placeholder="Enter DPA Name" +required=true +type="Text" + +[ctp_mastercard.metadata.locale] +name="locale" +label="Locale" +placeholder="Enter locale" +required=true +type="Text" + +[[ctp_mastercard.metadata.card_brands]] +name="card_brands" +label="Card Brands" +placeholder="Enter Card Brands" +required=true +type="MultiSelect" +options=["visa","mastercard"] + +[[ctp_mastercard.metadata.acquirer_bin]] +name="acquirer_bin" +label="Acquire Bin" +placeholder="Enter Acquirer Bin" +required=true +type="Text" + +[[ctp_mastercard.metadata.acquirer_merchant_id]] +name="acquirer_merchant_id" +label="Acquire Merchant Id" +placeholder="Enter Acquirer Merchant Id" +required=true +type="Text" + +[[ctp_mastercard.metadata.merchant_category_code]] +name="merchant_category_code" +label="Merchant Category Code" +placeholder="Enter Merchant Category Code" +required=true +type="Text" + +[[ctp_mastercard.metadata.merchant_country_code]] +name="merchant_country_code" +label="Merchant Country Code" +placeholder="Enter Merchant Country Code" +required=true +type="Text" diff --git a/crates/connector_configs/toml/sandbox.toml b/crates/connector_configs/toml/sandbox.toml index 1e9d274780b7..4d3f6ede1403 100644 --- a/crates/connector_configs/toml/sandbox.toml +++ b/crates/connector_configs/toml/sandbox.toml @@ -4318,4 +4318,65 @@ merchant_secret="Source verification key" [elavon.connector_auth.SignatureKey] api_key="Account Id" key1="User ID" -api_secret="Pin" \ No newline at end of file +api_secret="Pin" + +[ctp_mastercard] +[ctp_mastercard.connector_auth.HeaderKey] +api_key="API Key" + +[ctp_mastercard.metadata.dpa_id] +name="dpa_id" +label="DPA Id" +placeholder="Enter DPA Id" +required=true +type="Text" + +[ctp_mastercard.metadata.dpa_name] +name="dpa_name" +label="DPA Name" +placeholder="Enter DPA Name" +required=true +type="Text" + +[ctp_mastercard.metadata.locale] +name="locale" +label="Locale" +placeholder="Enter locale" +required=true +type="Text" + +[[ctp_mastercard.metadata.card_brands]] +name="card_brands" +label="Card Brands" +placeholder="Enter Card Brands" +required=true +type="MultiSelect" +options=["visa","mastercard"] + +[[ctp_mastercard.metadata.acquirer_bin]] +name="acquirer_bin" +label="Acquire Bin" +placeholder="Enter Acquirer Bin" +required=true +type="Text" + +[[ctp_mastercard.metadata.acquirer_merchant_id]] +name="acquirer_merchant_id" +label="Acquire Merchant Id" +placeholder="Enter Acquirer Merchant Id" +required=true +type="Text" + +[[ctp_mastercard.metadata.merchant_category_code]] +name="merchant_category_code" +label="Merchant Category Code" +placeholder="Enter Merchant Category Code" +required=true +type="Text" + +[[ctp_mastercard.metadata.merchant_country_code]] +name="merchant_country_code" +label="Merchant Country Code" +placeholder="Enter Merchant Country Code" +required=true +type="Text"