mirror of
				https://github.com/juspay/hyperswitch.git
				synced 2025-10-31 01:57:45 +08:00 
			
		
		
		
	feat(core): Added Reward PaymentMethod & CurrencyAuthKey for Hyperswitch <> UCS Integration (#8767)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
		
							
								
								
									
										6
									
								
								Cargo.lock
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										6
									
								
								Cargo.lock
									
									
									
										generated
									
									
									
								
							| @ -3041,6 +3041,7 @@ dependencies = [ | |||||||
|  "aws-sdk-sts", |  "aws-sdk-sts", | ||||||
|  "aws-smithy-runtime", |  "aws-smithy-runtime", | ||||||
|  "base64 0.22.1", |  "base64 0.22.1", | ||||||
|  |  "common_enums", | ||||||
|  "common_utils", |  "common_utils", | ||||||
|  "dyn-clone", |  "dyn-clone", | ||||||
|  "error-stack 0.4.1", |  "error-stack 0.4.1", | ||||||
| @ -3061,6 +3062,7 @@ dependencies = [ | |||||||
|  "router_env", |  "router_env", | ||||||
|  "rust-grpc-client", |  "rust-grpc-client", | ||||||
|  "serde", |  "serde", | ||||||
|  |  "serde_json", | ||||||
|  "thiserror 1.0.69", |  "thiserror 1.0.69", | ||||||
|  "time", |  "time", | ||||||
|  "tokio 1.45.1", |  "tokio 1.45.1", | ||||||
| @ -3538,7 +3540,7 @@ dependencies = [ | |||||||
| [[package]] | [[package]] | ||||||
| name = "grpc-api-types" | name = "grpc-api-types" | ||||||
| version = "0.1.0" | version = "0.1.0" | ||||||
| source = "git+https://github.com/juspay/connector-service?rev=4387a6310dc9c2693b453b455a8032623f3d6a81#4387a6310dc9c2693b453b455a8032623f3d6a81" | source = "git+https://github.com/juspay/connector-service?rev=2263c96a70f2606475ab30e6f716b2773e1fd093#2263c96a70f2606475ab30e6f716b2773e1fd093" | ||||||
| dependencies = [ | dependencies = [ | ||||||
|  "axum 0.8.4", |  "axum 0.8.4", | ||||||
|  "error-stack 0.5.0", |  "error-stack 0.5.0", | ||||||
| @ -6914,7 +6916,7 @@ dependencies = [ | |||||||
| [[package]] | [[package]] | ||||||
| name = "rust-grpc-client" | name = "rust-grpc-client" | ||||||
| version = "0.1.0" | version = "0.1.0" | ||||||
| source = "git+https://github.com/juspay/connector-service?rev=4387a6310dc9c2693b453b455a8032623f3d6a81#4387a6310dc9c2693b453b455a8032623f3d6a81" | source = "git+https://github.com/juspay/connector-service?rev=2263c96a70f2606475ab30e6f716b2773e1fd093#2263c96a70f2606475ab30e6f716b2773e1fd093" | ||||||
| dependencies = [ | dependencies = [ | ||||||
|  "grpc-api-types", |  "grpc-api-types", | ||||||
| ] | ] | ||||||
|  | |||||||
| @ -51,6 +51,7 @@ lettre = "0.11.16" | |||||||
| once_cell = "1.21.3" | once_cell = "1.21.3" | ||||||
| serde = { version = "1.0.219", features = ["derive"] } | serde = { version = "1.0.219", features = ["derive"] } | ||||||
| thiserror = "1.0.69" | thiserror = "1.0.69" | ||||||
|  | serde_json = "1.0.140" | ||||||
| vaultrs = { version = "0.7.4", optional = true } | vaultrs = { version = "0.7.4", optional = true } | ||||||
| prost = { version = "0.13", optional = true } | prost = { version = "0.13", optional = true } | ||||||
| prost-types = { version = "0.13", optional = true } | prost-types = { version = "0.13", optional = true } | ||||||
| @ -65,11 +66,12 @@ reqwest = { version = "0.11.27", features = ["rustls-tls"] } | |||||||
| http = "0.2.12" | http = "0.2.12" | ||||||
| url = { version = "2.5.4", features = ["serde"] } | url = { version = "2.5.4", features = ["serde"] } | ||||||
| quick-xml = { version = "0.31.0", features = ["serialize"] } | quick-xml = { version = "0.31.0", features = ["serialize"] } | ||||||
| unified-connector-service-client = { git = "https://github.com/juspay/connector-service", rev = "4387a6310dc9c2693b453b455a8032623f3d6a81", package = "rust-grpc-client" } | unified-connector-service-client = { git = "https://github.com/juspay/connector-service", rev = "2263c96a70f2606475ab30e6f716b2773e1fd093", package = "rust-grpc-client" } | ||||||
|  |  | ||||||
|  |  | ||||||
| # First party crates | # First party crates | ||||||
| common_utils = { version = "0.1.0", path = "../common_utils" } | common_utils = { version = "0.1.0", path = "../common_utils" } | ||||||
|  | common_enums = { version = "0.1.0", path = "../common_enums" } | ||||||
| hyperswitch_interfaces = { version = "0.1.0", path = "../hyperswitch_interfaces", default-features = false } | hyperswitch_interfaces = { version = "0.1.0", path = "../hyperswitch_interfaces", default-features = false } | ||||||
| masking = { version = "0.1.0", path = "../masking" } | masking = { version = "0.1.0", path = "../masking" } | ||||||
| router_env = { version = "0.1.0", path = "../router_env", features = [ | router_env = { version = "0.1.0", path = "../router_env", features = [ | ||||||
|  | |||||||
| @ -1,3 +1,5 @@ | |||||||
|  | use std::collections::HashMap; | ||||||
|  |  | ||||||
| use common_utils::{consts as common_utils_consts, errors::CustomResult, types::Url}; | use common_utils::{consts as common_utils_consts, errors::CustomResult, types::Url}; | ||||||
| use error_stack::ResultExt; | use error_stack::ResultExt; | ||||||
| use masking::{PeekInterface, Secret}; | use masking::{PeekInterface, Secret}; | ||||||
| @ -144,6 +146,10 @@ pub struct ConnectorAuthMetadata { | |||||||
|     /// Optional API secret used for signature or secure authentication. |     /// Optional API secret used for signature or secure authentication. | ||||||
|     pub api_secret: Option<Secret<String>>, |     pub api_secret: Option<Secret<String>>, | ||||||
|  |  | ||||||
|  |     /// Optional auth_key_map used for authentication. | ||||||
|  |     pub auth_key_map: | ||||||
|  |         Option<HashMap<common_enums::enums::Currency, common_utils::pii::SecretSerdeValue>>, | ||||||
|  |  | ||||||
|     /// Id of the merchant. |     /// Id of the merchant. | ||||||
|     pub merchant_id: Secret<String>, |     pub merchant_id: Secret<String>, | ||||||
| } | } | ||||||
| @ -381,6 +387,16 @@ pub fn build_unified_connector_service_grpc_headers( | |||||||
|             parse("api_secret", api_secret.peek())?, |             parse("api_secret", api_secret.peek())?, | ||||||
|         ); |         ); | ||||||
|     } |     } | ||||||
|  |     if let Some(auth_key_map) = meta.auth_key_map { | ||||||
|  |         let auth_key_map_str = serde_json::to_string(&auth_key_map).map_err(|error| { | ||||||
|  |             logger::error!(?error); | ||||||
|  |             UnifiedConnectorServiceError::ParsingFailed | ||||||
|  |         })?; | ||||||
|  |         metadata.append( | ||||||
|  |             consts::UCS_HEADER_AUTH_KEY_MAP, | ||||||
|  |             parse("auth_key_map", &auth_key_map_str)?, | ||||||
|  |         ); | ||||||
|  |     } | ||||||
|  |  | ||||||
|     metadata.append( |     metadata.append( | ||||||
|         common_utils_consts::X_MERCHANT_ID, |         common_utils_consts::X_MERCHANT_ID, | ||||||
|  | |||||||
| @ -85,6 +85,9 @@ pub mod consts { | |||||||
|  |  | ||||||
|     /// Header key for sending the API secret in signature-based authentication. |     /// Header key for sending the API secret in signature-based authentication. | ||||||
|     pub(crate) const UCS_HEADER_API_SECRET: &str = "x-api-secret"; |     pub(crate) const UCS_HEADER_API_SECRET: &str = "x-api-secret"; | ||||||
|  |  | ||||||
|  |     /// Header key for sending the AUTH KEY MAP in currency-based authentication. | ||||||
|  |     pub(crate) const UCS_HEADER_AUTH_KEY_MAP: &str = "x-auth-key-map"; | ||||||
| } | } | ||||||
|  |  | ||||||
| /// Metrics for interactions with external systems. | /// Metrics for interactions with external systems. | ||||||
|  | |||||||
| @ -89,7 +89,7 @@ reqwest = { version = "0.11.27", features = ["json", "rustls-tls", "gzip", "mult | |||||||
| ring = "0.17.14" | ring = "0.17.14" | ||||||
| rust_decimal = { version = "1.37.1", features = ["serde-with-float", "serde-with-str"] } | rust_decimal = { version = "1.37.1", features = ["serde-with-float", "serde-with-str"] } | ||||||
| rust-i18n = { git = "https://github.com/kashif-m/rust-i18n", rev = "f2d8096aaaff7a87a847c35a5394c269f75e077a" } | rust-i18n = { git = "https://github.com/kashif-m/rust-i18n", rev = "f2d8096aaaff7a87a847c35a5394c269f75e077a" } | ||||||
| unified-connector-service-client = { git = "https://github.com/juspay/connector-service", rev = "4387a6310dc9c2693b453b455a8032623f3d6a81", package = "rust-grpc-client" } | unified-connector-service-client = { git = "https://github.com/juspay/connector-service", rev = "2263c96a70f2606475ab30e6f716b2773e1fd093", package = "rust-grpc-client" } | ||||||
| rustc-hash = "1.1.0" | rustc-hash = "1.1.0" | ||||||
| rustls = "0.22" | rustls = "0.22" | ||||||
| rustls-pemfile = "2" | rustls-pemfile = "2" | ||||||
|  | |||||||
| @ -326,3 +326,6 @@ pub const UCS_AUTH_BODY_KEY: &str = "body-key"; | |||||||
|  |  | ||||||
| /// Header value indicating that header-key-based authentication is used. | /// Header value indicating that header-key-based authentication is used. | ||||||
| pub const UCS_AUTH_HEADER_KEY: &str = "header-key"; | pub const UCS_AUTH_HEADER_KEY: &str = "header-key"; | ||||||
|  |  | ||||||
|  | /// Header value indicating that currency-auth-key-based authentication is used. | ||||||
|  | pub const UCS_AUTH_CURRENCY_AUTH_KEY: &str = "currency-auth-key"; | ||||||
|  | |||||||
| @ -18,7 +18,7 @@ use masking::{ExposeInterface, PeekInterface, Secret}; | |||||||
| use router_env::logger; | use router_env::logger; | ||||||
| use unified_connector_service_client::payments::{ | use unified_connector_service_client::payments::{ | ||||||
|     self as payments_grpc, payment_method::PaymentMethod, CardDetails, CardPaymentMethodType, |     self as payments_grpc, payment_method::PaymentMethod, CardDetails, CardPaymentMethodType, | ||||||
|     PaymentServiceAuthorizeResponse, |     PaymentServiceAuthorizeResponse, RewardPaymentMethodType, | ||||||
| }; | }; | ||||||
|  |  | ||||||
| use crate::{ | use crate::{ | ||||||
| @ -325,6 +325,24 @@ pub fn build_unified_connector_service_payment_method( | |||||||
|                 payment_method: Some(upi_type), |                 payment_method: Some(upi_type), | ||||||
|             }) |             }) | ||||||
|         } |         } | ||||||
|  |         hyperswitch_domain_models::payment_method_data::PaymentMethodData::Reward => { | ||||||
|  |             match payment_method_type { | ||||||
|  |                 PaymentMethodType::ClassicReward => Ok(payments_grpc::PaymentMethod { | ||||||
|  |                     payment_method: Some(PaymentMethod::Reward(RewardPaymentMethodType { | ||||||
|  |                         reward_type: 1, | ||||||
|  |                     })), | ||||||
|  |                 }), | ||||||
|  |                 PaymentMethodType::Evoucher => Ok(payments_grpc::PaymentMethod { | ||||||
|  |                     payment_method: Some(PaymentMethod::Reward(RewardPaymentMethodType { | ||||||
|  |                         reward_type: 2, | ||||||
|  |                     })), | ||||||
|  |                 }), | ||||||
|  |                 _ => Err(UnifiedConnectorServiceError::NotImplemented(format!( | ||||||
|  |                     "Unimplemented payment method subtype: {payment_method_type:?}" | ||||||
|  |                 )) | ||||||
|  |                 .into()), | ||||||
|  |             } | ||||||
|  |         } | ||||||
|         _ => Err(UnifiedConnectorServiceError::NotImplemented(format!( |         _ => Err(UnifiedConnectorServiceError::NotImplemented(format!( | ||||||
|             "Unimplemented payment method: {payment_method_data:?}" |             "Unimplemented payment method: {payment_method_data:?}" | ||||||
|         )) |         )) | ||||||
| @ -385,6 +403,7 @@ pub fn build_unified_connector_service_auth_metadata( | |||||||
|             api_key: Some(api_key.clone()), |             api_key: Some(api_key.clone()), | ||||||
|             key1: Some(key1.clone()), |             key1: Some(key1.clone()), | ||||||
|             api_secret: Some(api_secret.clone()), |             api_secret: Some(api_secret.clone()), | ||||||
|  |             auth_key_map: None, | ||||||
|             merchant_id: Secret::new(merchant_id.to_string()), |             merchant_id: Secret::new(merchant_id.to_string()), | ||||||
|         }), |         }), | ||||||
|         ConnectorAuthType::BodyKey { api_key, key1 } => Ok(ConnectorAuthMetadata { |         ConnectorAuthType::BodyKey { api_key, key1 } => Ok(ConnectorAuthMetadata { | ||||||
| @ -393,6 +412,7 @@ pub fn build_unified_connector_service_auth_metadata( | |||||||
|             api_key: Some(api_key.clone()), |             api_key: Some(api_key.clone()), | ||||||
|             key1: Some(key1.clone()), |             key1: Some(key1.clone()), | ||||||
|             api_secret: None, |             api_secret: None, | ||||||
|  |             auth_key_map: None, | ||||||
|             merchant_id: Secret::new(merchant_id.to_string()), |             merchant_id: Secret::new(merchant_id.to_string()), | ||||||
|         }), |         }), | ||||||
|         ConnectorAuthType::HeaderKey { api_key } => Ok(ConnectorAuthMetadata { |         ConnectorAuthType::HeaderKey { api_key } => Ok(ConnectorAuthMetadata { | ||||||
| @ -401,6 +421,16 @@ pub fn build_unified_connector_service_auth_metadata( | |||||||
|             api_key: Some(api_key.clone()), |             api_key: Some(api_key.clone()), | ||||||
|             key1: None, |             key1: None, | ||||||
|             api_secret: None, |             api_secret: None, | ||||||
|  |             auth_key_map: None, | ||||||
|  |             merchant_id: Secret::new(merchant_id.to_string()), | ||||||
|  |         }), | ||||||
|  |         ConnectorAuthType::CurrencyAuthKey { auth_key_map } => Ok(ConnectorAuthMetadata { | ||||||
|  |             connector_name, | ||||||
|  |             auth_type: consts::UCS_AUTH_CURRENCY_AUTH_KEY.to_string(), | ||||||
|  |             api_key: None, | ||||||
|  |             key1: None, | ||||||
|  |             api_secret: None, | ||||||
|  |             auth_key_map: Some(auth_key_map.clone()), | ||||||
|             merchant_id: Secret::new(merchant_id.to_string()), |             merchant_id: Secret::new(merchant_id.to_string()), | ||||||
|         }), |         }), | ||||||
|         _ => Err(UnifiedConnectorServiceError::FailedToObtainAuthType) |         _ => Err(UnifiedConnectorServiceError::FailedToObtainAuthType) | ||||||
|  | |||||||
| @ -51,6 +51,16 @@ impl ForeignTryFrom<&RouterData<PSync, PaymentsSyncData, PaymentsResponseData>> | |||||||
|             }) |             }) | ||||||
|             .ok(); |             .ok(); | ||||||
|  |  | ||||||
|  |         let encoded_data = router_data | ||||||
|  |             .request | ||||||
|  |             .encoded_data | ||||||
|  |             .as_ref() | ||||||
|  |             .map(|data| Identifier { | ||||||
|  |                 id_type: Some(payments_grpc::identifier::IdType::EncodedData( | ||||||
|  |                     data.to_string(), | ||||||
|  |                 )), | ||||||
|  |             }); | ||||||
|  |  | ||||||
|         let connector_ref_id = router_data |         let connector_ref_id = router_data | ||||||
|             .request |             .request | ||||||
|             .connector_reference_id |             .connector_reference_id | ||||||
| @ -60,7 +70,7 @@ impl ForeignTryFrom<&RouterData<PSync, PaymentsSyncData, PaymentsResponseData>> | |||||||
|             }); |             }); | ||||||
|  |  | ||||||
|         Ok(Self { |         Ok(Self { | ||||||
|             transaction_id: connector_transaction_id, |             transaction_id: connector_transaction_id.or(encoded_data), | ||||||
|             request_ref_id: connector_ref_id, |             request_ref_id: connector_ref_id, | ||||||
|         }) |         }) | ||||||
|     } |     } | ||||||
| @ -319,6 +329,19 @@ impl ForeignTryFrom<&RouterData<Authorize, PaymentsAuthorizeData, PaymentsRespon | |||||||
|             } |             } | ||||||
|         }; |         }; | ||||||
|  |  | ||||||
|  |         let capture_method = router_data | ||||||
|  |             .request | ||||||
|  |             .capture_method | ||||||
|  |             .map(payments_grpc::CaptureMethod::foreign_try_from) | ||||||
|  |             .transpose()?; | ||||||
|  |  | ||||||
|  |         let browser_info = router_data | ||||||
|  |             .request | ||||||
|  |             .browser_info | ||||||
|  |             .clone() | ||||||
|  |             .map(payments_grpc::BrowserInformation::foreign_try_from) | ||||||
|  |             .transpose()?; | ||||||
|  |  | ||||||
|         Ok(Self { |         Ok(Self { | ||||||
|             request_ref_id: Some(Identifier { |             request_ref_id: Some(Identifier { | ||||||
|                 id_type: Some(payments_grpc::identifier::IdType::Id( |                 id_type: Some(payments_grpc::identifier::IdType::Id( | ||||||
| @ -342,6 +365,13 @@ impl ForeignTryFrom<&RouterData<Authorize, PaymentsAuthorizeData, PaymentsRespon | |||||||
|                 }) |                 }) | ||||||
|                 .unwrap_or_default(), |                 .unwrap_or_default(), | ||||||
|             webhook_url: router_data.request.webhook_url.clone(), |             webhook_url: router_data.request.webhook_url.clone(), | ||||||
|  |             capture_method: capture_method.map(|capture_method| capture_method.into()), | ||||||
|  |             email: router_data | ||||||
|  |                 .request | ||||||
|  |                 .email | ||||||
|  |                 .clone() | ||||||
|  |                 .map(|e| e.expose().expose()), | ||||||
|  |             browser_info, | ||||||
|         }) |         }) | ||||||
|     } |     } | ||||||
| } | } | ||||||
| @ -370,13 +400,11 @@ impl ForeignTryFrom<payments_grpc::PaymentServiceAuthorizeResponse> | |||||||
|                     }) |                     }) | ||||||
|             }); |             }); | ||||||
|  |  | ||||||
|         let transaction_id = response.transaction_id.as_ref().and_then(|id| { |         let resource_id: hyperswitch_domain_models::router_request_types::ResponseId = match response.transaction_id.as_ref().and_then(|id| id.id_type.clone()) { | ||||||
|             id.id_type.clone().and_then(|id_type| match id_type { |             Some(payments_grpc::identifier::IdType::Id(id)) => hyperswitch_domain_models::router_request_types::ResponseId::ConnectorTransactionId(id), | ||||||
|                 payments_grpc::identifier::IdType::Id(id) => Some(id), |             Some(payments_grpc::identifier::IdType::EncodedData(encoded_data)) => hyperswitch_domain_models::router_request_types::ResponseId::EncodedData(encoded_data), | ||||||
|                 payments_grpc::identifier::IdType::EncodedData(encoded_data) => Some(encoded_data), |             Some(payments_grpc::identifier::IdType::NoResponseIdMarker(_)) | None => hyperswitch_domain_models::router_request_types::ResponseId::NoResponseId, | ||||||
|                 payments_grpc::identifier::IdType::NoResponseIdMarker(_) => None, |         }; | ||||||
|             }) |  | ||||||
|         }); |  | ||||||
|  |  | ||||||
|         let (connector_metadata, redirection_data) = match response.redirection_data.clone() { |         let (connector_metadata, redirection_data) = match response.redirection_data.clone() { | ||||||
|             Some(redirection_data) => match redirection_data.form_type { |             Some(redirection_data) => match redirection_data.form_type { | ||||||
| @ -423,13 +451,8 @@ impl ForeignTryFrom<payments_grpc::PaymentServiceAuthorizeResponse> | |||||||
|             }) |             }) | ||||||
|         } else { |         } else { | ||||||
|             Ok(PaymentsResponseData::TransactionResponse { |             Ok(PaymentsResponseData::TransactionResponse { | ||||||
|                 resource_id: match transaction_id.as_ref() { |                 resource_id, | ||||||
|                     Some(transaction_id) => hyperswitch_domain_models::router_request_types::ResponseId::ConnectorTransactionId(transaction_id.clone()), |                 redirection_data: Box::new(redirection_data), | ||||||
|                     None => hyperswitch_domain_models::router_request_types::ResponseId::NoResponseId, |  | ||||||
|                 }, |  | ||||||
|                 redirection_data: Box::new( |  | ||||||
|                     redirection_data |  | ||||||
|                 ), |  | ||||||
|                 mandate_reference: Box::new(None), |                 mandate_reference: Box::new(None), | ||||||
|                 connector_metadata, |                 connector_metadata, | ||||||
|                 network_txn_id: response.network_txn_id.clone(), |                 network_txn_id: response.network_txn_id.clone(), | ||||||
| @ -469,6 +492,12 @@ impl ForeignTryFrom<payments_grpc::PaymentServiceGetResponse> | |||||||
|  |  | ||||||
|         let status_code = convert_connector_service_status_code(response.status_code)?; |         let status_code = convert_connector_service_status_code(response.status_code)?; | ||||||
|  |  | ||||||
|  |         let resource_id: hyperswitch_domain_models::router_request_types::ResponseId = match response.transaction_id.as_ref().and_then(|id| id.id_type.clone()) { | ||||||
|  |             Some(payments_grpc::identifier::IdType::Id(id)) => hyperswitch_domain_models::router_request_types::ResponseId::ConnectorTransactionId(id), | ||||||
|  |             Some(payments_grpc::identifier::IdType::EncodedData(encoded_data)) => hyperswitch_domain_models::router_request_types::ResponseId::EncodedData(encoded_data), | ||||||
|  |             Some(payments_grpc::identifier::IdType::NoResponseIdMarker(_)) | None => hyperswitch_domain_models::router_request_types::ResponseId::NoResponseId, | ||||||
|  |         }; | ||||||
|  |  | ||||||
|         let response = if response.error_code.is_some() { |         let response = if response.error_code.is_some() { | ||||||
|             Err(ErrorResponse { |             Err(ErrorResponse { | ||||||
|                 code: response.error_code().to_owned(), |                 code: response.error_code().to_owned(), | ||||||
| @ -483,21 +512,22 @@ impl ForeignTryFrom<payments_grpc::PaymentServiceGetResponse> | |||||||
|             }) |             }) | ||||||
|         } else { |         } else { | ||||||
|             Ok(PaymentsResponseData::TransactionResponse { |             Ok(PaymentsResponseData::TransactionResponse { | ||||||
|                 resource_id: match connector_response_reference_id.as_ref() { |                 resource_id, | ||||||
|                     Some(connector_response_reference_id) => hyperswitch_domain_models::router_request_types::ResponseId::ConnectorTransactionId(connector_response_reference_id.clone()), |                 redirection_data: Box::new(None), | ||||||
|                     None => hyperswitch_domain_models::router_request_types::ResponseId::NoResponseId, |                 mandate_reference: Box::new(response.mandate_reference.map(|grpc_mandate| { | ||||||
|                 }, |                     hyperswitch_domain_models::router_response_types::MandateReference { | ||||||
|                 redirection_data: Box::new( |                         connector_mandate_id: grpc_mandate.mandate_id, | ||||||
|                     None |                         payment_method_id: None, | ||||||
|                 ), |                         mandate_metadata: None, | ||||||
|                 mandate_reference: Box::new(None), |                         connector_mandate_request_reference_id: None, | ||||||
|  |                     } | ||||||
|  |                 })), | ||||||
|                 connector_metadata: None, |                 connector_metadata: None, | ||||||
|                 network_txn_id: response.network_txn_id.clone(), |                 network_txn_id: response.network_txn_id.clone(), | ||||||
|                 connector_response_reference_id, |                 connector_response_reference_id, | ||||||
|                 incremental_authorization_allowed: None, |                 incremental_authorization_allowed: None, | ||||||
|                 charges: None, |                 charges: None, | ||||||
|                 } |             }) | ||||||
|             ) |  | ||||||
|         }; |         }; | ||||||
|  |  | ||||||
|         Ok(response) |         Ok(response) | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user
	 Saptak Dutta
					Saptak Dutta