mirror of
				https://github.com/juspay/hyperswitch.git
				synced 2025-10-31 01:57:45 +08:00 
			
		
		
		
	refactor(connector): [Klarna] Mask PII data (#3854)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
		| @ -1,6 +1,6 @@ | |||||||
| use api_models::payments; | use api_models::payments; | ||||||
| use error_stack::report; | use error_stack::report; | ||||||
| use masking::Secret; | use masking::{ExposeInterface, Secret}; | ||||||
| use serde::{Deserialize, Serialize}; | use serde::{Deserialize, Serialize}; | ||||||
|  |  | ||||||
| use crate::{ | use crate::{ | ||||||
| @ -66,8 +66,8 @@ pub struct KlarnaSessionRequest { | |||||||
|  |  | ||||||
| #[derive(Deserialize, Serialize, Debug)] | #[derive(Deserialize, Serialize, Debug)] | ||||||
| pub struct KlarnaSessionResponse { | pub struct KlarnaSessionResponse { | ||||||
|     pub client_token: String, |     pub client_token: Secret<String>, | ||||||
|     pub session_id: String, |     pub session_id: Secret<String>, | ||||||
| } | } | ||||||
|  |  | ||||||
| impl TryFrom<&types::PaymentsSessionRouterData> for KlarnaSessionRequest { | impl TryFrom<&types::PaymentsSessionRouterData> for KlarnaSessionRequest { | ||||||
| @ -110,8 +110,8 @@ impl TryFrom<types::PaymentsSessionResponseRouterData<KlarnaSessionResponse>> | |||||||
|             response: Ok(types::PaymentsResponseData::SessionResponse { |             response: Ok(types::PaymentsResponseData::SessionResponse { | ||||||
|                 session_token: types::api::SessionToken::Klarna(Box::new( |                 session_token: types::api::SessionToken::Klarna(Box::new( | ||||||
|                     payments::KlarnaSessionTokenResponse { |                     payments::KlarnaSessionTokenResponse { | ||||||
|                         session_token: response.client_token.clone(), |                         session_token: response.client_token.clone().expose(), | ||||||
|                         session_id: response.session_id.clone(), |                         session_id: response.session_id.clone().expose(), | ||||||
|                     }, |                     }, | ||||||
|                 )), |                 )), | ||||||
|             }), |             }), | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user
	 AkshayaFoiger
					AkshayaFoiger