mirror of
				https://github.com/juspay/hyperswitch.git
				synced 2025-10-31 01:57:45 +08:00 
			
		
		
		
	feat(connector): Fix FPX refunds for Fiuu (#7890)
This commit is contained in:
		| @ -4818,6 +4818,12 @@ pub async fn get_additional_payment_data( | ||||
|                     details: None, | ||||
|                 }, | ||||
|             )), | ||||
|             domain::BankRedirectData::OnlineBankingFpx { issuer } => Ok(Some( | ||||
|                 api_models::payments::AdditionalPaymentData::BankRedirect { | ||||
|                     bank_name: Some(issuer.to_owned()), | ||||
|                     details: None, | ||||
|                 }, | ||||
|             )), | ||||
|             domain::BankRedirectData::Ideal { bank_name, .. } => Ok(Some( | ||||
|                 api_models::payments::AdditionalPaymentData::BankRedirect { | ||||
|                     bank_name: bank_name.to_owned(), | ||||
|  | ||||
| @ -111,6 +111,7 @@ pub async fn construct_relay_refund_router_data<F>( | ||||
|             merchant_account_id: None, | ||||
|             merchant_config_currency: None, | ||||
|             capture_method: None, | ||||
|             additional_payment_method_data: None, | ||||
|         }, | ||||
|  | ||||
|         response: Err(ErrorResponse::default()), | ||||
|  | ||||
| @ -349,6 +349,7 @@ pub async fn construct_refund_router_data<'a, F>( | ||||
|             merchant_config_currency, | ||||
|             refund_connector_metadata: refund.metadata.clone(), | ||||
|             capture_method: Some(capture_method), | ||||
|             additional_payment_method_data: None, | ||||
|         }, | ||||
|  | ||||
|         response: Ok(types::RefundsResponseData { | ||||
| @ -497,6 +498,17 @@ pub async fn construct_refund_router_data<'a, F>( | ||||
|         .and_then(|braintree| braintree.merchant_account_id.clone()); | ||||
|     let merchant_config_currency = | ||||
|         braintree_metadata.and_then(|braintree| braintree.merchant_config_currency); | ||||
|     let additional_payment_method_data: Option<api_models::payments::AdditionalPaymentData> = | ||||
|         payment_attempt | ||||
|             .payment_method_data | ||||
|             .clone() | ||||
|             .and_then(|value| match serde_json::from_value(value) { | ||||
|                 Ok(data) => Some(data), | ||||
|                 Err(e) => { | ||||
|                     router_env::logger::error!("Failed to deserialize payment_method_data: {}", e); | ||||
|                     None | ||||
|                 } | ||||
|             }); | ||||
|  | ||||
|     let router_data = types::RouterData { | ||||
|         flow: PhantomData, | ||||
| @ -540,6 +552,7 @@ pub async fn construct_refund_router_data<'a, F>( | ||||
|             merchant_account_id, | ||||
|             merchant_config_currency, | ||||
|             capture_method, | ||||
|             additional_payment_method_data, | ||||
|         }, | ||||
|  | ||||
|         response: Ok(types::RefundsResponseData { | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 awasthi21
					awasthi21