mirror of
				https://github.com/juspay/hyperswitch.git
				synced 2025-10-31 10:06:32 +08:00 
			
		
		
		
	feat(connector): [Dlocal] Use connector_response_reference_id as reference to merchant (#2446)
This commit is contained in:
		| @ -250,6 +250,7 @@ pub struct DlocalPaymentsResponse { | |||||||
|     status: DlocalPaymentStatus, |     status: DlocalPaymentStatus, | ||||||
|     id: String, |     id: String, | ||||||
|     three_dsecure: Option<ThreeDSecureResData>, |     three_dsecure: Option<ThreeDSecureResData>, | ||||||
|  |     order_id: String, | ||||||
| } | } | ||||||
|  |  | ||||||
| impl<F, T> | impl<F, T> | ||||||
| @ -269,12 +270,12 @@ impl<F, T> | |||||||
|             }); |             }); | ||||||
|  |  | ||||||
|         let response = types::PaymentsResponseData::TransactionResponse { |         let response = types::PaymentsResponseData::TransactionResponse { | ||||||
|             resource_id: types::ResponseId::ConnectorTransactionId(item.response.id), |             resource_id: types::ResponseId::ConnectorTransactionId(item.response.order_id.clone()), | ||||||
|             redirection_data, |             redirection_data, | ||||||
|             mandate_reference: None, |             mandate_reference: None, | ||||||
|             connector_metadata: None, |             connector_metadata: None, | ||||||
|             network_txn_id: None, |             network_txn_id: None, | ||||||
|             connector_response_reference_id: None, |             connector_response_reference_id: Some(item.response.order_id.clone()), | ||||||
|         }; |         }; | ||||||
|         Ok(Self { |         Ok(Self { | ||||||
|             status: enums::AttemptStatus::from(item.response.status), |             status: enums::AttemptStatus::from(item.response.status), | ||||||
| @ -288,6 +289,7 @@ impl<F, T> | |||||||
| pub struct DlocalPaymentsSyncResponse { | pub struct DlocalPaymentsSyncResponse { | ||||||
|     status: DlocalPaymentStatus, |     status: DlocalPaymentStatus, | ||||||
|     id: String, |     id: String, | ||||||
|  |     order_id: String, | ||||||
| } | } | ||||||
|  |  | ||||||
| impl<F, T> | impl<F, T> | ||||||
| @ -307,12 +309,14 @@ impl<F, T> | |||||||
|         Ok(Self { |         Ok(Self { | ||||||
|             status: enums::AttemptStatus::from(item.response.status), |             status: enums::AttemptStatus::from(item.response.status), | ||||||
|             response: Ok(types::PaymentsResponseData::TransactionResponse { |             response: Ok(types::PaymentsResponseData::TransactionResponse { | ||||||
|                 resource_id: types::ResponseId::ConnectorTransactionId(item.response.id), |                 resource_id: types::ResponseId::ConnectorTransactionId( | ||||||
|  |                     item.response.order_id.clone(), | ||||||
|  |                 ), | ||||||
|                 redirection_data: None, |                 redirection_data: None, | ||||||
|                 mandate_reference: None, |                 mandate_reference: None, | ||||||
|                 connector_metadata: None, |                 connector_metadata: None, | ||||||
|                 network_txn_id: None, |                 network_txn_id: None, | ||||||
|                 connector_response_reference_id: None, |                 connector_response_reference_id: Some(item.response.order_id.clone()), | ||||||
|             }), |             }), | ||||||
|             ..item.data |             ..item.data | ||||||
|         }) |         }) | ||||||
| @ -323,6 +327,7 @@ impl<F, T> | |||||||
| pub struct DlocalPaymentsCaptureResponse { | pub struct DlocalPaymentsCaptureResponse { | ||||||
|     status: DlocalPaymentStatus, |     status: DlocalPaymentStatus, | ||||||
|     id: String, |     id: String, | ||||||
|  |     order_id: String, | ||||||
| } | } | ||||||
|  |  | ||||||
| impl<F, T> | impl<F, T> | ||||||
| @ -342,12 +347,14 @@ impl<F, T> | |||||||
|         Ok(Self { |         Ok(Self { | ||||||
|             status: enums::AttemptStatus::from(item.response.status), |             status: enums::AttemptStatus::from(item.response.status), | ||||||
|             response: Ok(types::PaymentsResponseData::TransactionResponse { |             response: Ok(types::PaymentsResponseData::TransactionResponse { | ||||||
|                 resource_id: types::ResponseId::ConnectorTransactionId(item.response.id), |                 resource_id: types::ResponseId::ConnectorTransactionId( | ||||||
|  |                     item.response.order_id.clone(), | ||||||
|  |                 ), | ||||||
|                 redirection_data: None, |                 redirection_data: None, | ||||||
|                 mandate_reference: None, |                 mandate_reference: None, | ||||||
|                 connector_metadata: None, |                 connector_metadata: None, | ||||||
|                 network_txn_id: None, |                 network_txn_id: None, | ||||||
|                 connector_response_reference_id: None, |                 connector_response_reference_id: Some(item.response.order_id.clone()), | ||||||
|             }), |             }), | ||||||
|             ..item.data |             ..item.data | ||||||
|         }) |         }) | ||||||
| @ -356,7 +363,7 @@ impl<F, T> | |||||||
|  |  | ||||||
| pub struct DlocalPaymentsCancelResponse { | pub struct DlocalPaymentsCancelResponse { | ||||||
|     status: DlocalPaymentStatus, |     status: DlocalPaymentStatus, | ||||||
|     id: String, |     order_id: String, | ||||||
| } | } | ||||||
|  |  | ||||||
| impl<F, T> | impl<F, T> | ||||||
| @ -376,12 +383,14 @@ impl<F, T> | |||||||
|         Ok(Self { |         Ok(Self { | ||||||
|             status: enums::AttemptStatus::from(item.response.status), |             status: enums::AttemptStatus::from(item.response.status), | ||||||
|             response: Ok(types::PaymentsResponseData::TransactionResponse { |             response: Ok(types::PaymentsResponseData::TransactionResponse { | ||||||
|                 resource_id: types::ResponseId::ConnectorTransactionId(item.response.id), |                 resource_id: types::ResponseId::ConnectorTransactionId( | ||||||
|  |                     item.response.order_id.clone(), | ||||||
|  |                 ), | ||||||
|                 redirection_data: None, |                 redirection_data: None, | ||||||
|                 mandate_reference: None, |                 mandate_reference: None, | ||||||
|                 connector_metadata: None, |                 connector_metadata: None, | ||||||
|                 network_txn_id: None, |                 network_txn_id: None, | ||||||
|                 connector_response_reference_id: None, |                 connector_response_reference_id: Some(item.response.order_id.clone()), | ||||||
|             }), |             }), | ||||||
|             ..item.data |             ..item.data | ||||||
|         }) |         }) | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user
	 Sargam Puram
					Sargam Puram