mirror of
				https://github.com/juspay/hyperswitch.git
				synced 2025-10-31 18:17:13 +08:00 
			
		
		
		
	refactor(payment_attempt_v2): add payment attempt v2 domain and diesel models (#6027)
Co-authored-by: hrithikesh026 <hrithikesh.vm@juspay.in> Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
		| @ -1224,6 +1224,7 @@ pub fn is_merchant_enabled_for_payment_id_as_connector_request_id( | ||||
|     config_map.contains(merchant_id) | ||||
| } | ||||
|  | ||||
| #[cfg(feature = "v1")] | ||||
| pub fn get_connector_request_reference_id( | ||||
|     conf: &Settings, | ||||
|     merchant_id: &common_utils::id_type::MerchantId, | ||||
| @ -1235,10 +1236,20 @@ pub fn get_connector_request_reference_id( | ||||
|     if is_config_enabled_for_merchant { | ||||
|         payment_attempt.payment_id.get_string_repr().to_owned() | ||||
|     } else { | ||||
|         payment_attempt.attempt_id.clone() | ||||
|         payment_attempt.attempt_id.to_owned() | ||||
|     } | ||||
| } | ||||
|  | ||||
| // TODO: Based on the connector configuration, the connector_request_reference_id should be generated | ||||
| #[cfg(feature = "v2")] | ||||
| pub fn get_connector_request_reference_id( | ||||
|     conf: &Settings, | ||||
|     merchant_id: &common_utils::id_type::MerchantId, | ||||
|     payment_attempt: &hyperswitch_domain_models::payments::payment_attempt::PaymentAttempt, | ||||
| ) -> String { | ||||
|     todo!() | ||||
| } | ||||
|  | ||||
| /// Validate whether the profile_id exists and is associated with the merchant_id | ||||
| pub async fn validate_and_get_business_profile( | ||||
|     db: &dyn StorageInterface, | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Narayan Bhat
					Narayan Bhat