mirror of
				https://github.com/juspay/hyperswitch.git
				synced 2025-10-31 01:57:45 +08:00 
			
		
		
		
	feat(events): Add payment cancel events (#4166)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
		| @ -56,10 +56,11 @@ pub async fn payment_intents_create( | ||||
|         state.into_inner(), | ||||
|         &req, | ||||
|         create_payment_req, | ||||
|         |state, auth, req, _| { | ||||
|         |state, auth, req, req_state| { | ||||
|             let eligible_connectors = req.connector.clone(); | ||||
|             payments::payments_core::<api_types::Authorize, api_types::PaymentsResponse, _, _, _,Oss>( | ||||
|                 state, | ||||
|                 req_state, | ||||
|                 auth.merchant_account, | ||||
|                 auth.key_store, | ||||
|                 payments::PaymentCreate, | ||||
| @ -116,9 +117,10 @@ pub async fn payment_intents_retrieve( | ||||
|         state.into_inner(), | ||||
|         &req, | ||||
|         payload, | ||||
|         |state, auth, payload, _| { | ||||
|         |state, auth, payload, req_state| { | ||||
|             payments::payments_core::<api_types::PSync, api_types::PaymentsResponse, _, _, _, Oss>( | ||||
|                 state, | ||||
|                 req_state, | ||||
|                 auth.merchant_account, | ||||
|                 auth.key_store, | ||||
|                 payments::PaymentStatus, | ||||
| @ -185,9 +187,10 @@ pub async fn payment_intents_retrieve_with_gateway_creds( | ||||
|         state.into_inner(), | ||||
|         &req, | ||||
|         payload, | ||||
|         |state, auth, req, _| { | ||||
|         |state, auth, req, req_state| { | ||||
|             payments::payments_core::<api_types::PSync, payment_types::PaymentsResponse, _, _, _,Oss>( | ||||
|                 state, | ||||
|                 req_state, | ||||
|                 auth.merchant_account, | ||||
|                 auth.key_store, | ||||
|                 payments::PaymentStatus, | ||||
| @ -249,10 +252,11 @@ pub async fn payment_intents_update( | ||||
|         state.into_inner(), | ||||
|         &req, | ||||
|         payload, | ||||
|         |state, auth, req, _| { | ||||
|         |state, auth, req, req_state| { | ||||
|             let eligible_connectors = req.connector.clone(); | ||||
|             payments::payments_core::<api_types::Authorize, api_types::PaymentsResponse, _, _, _,Oss>( | ||||
|                 state, | ||||
|                 req_state, | ||||
|                 auth.merchant_account, | ||||
|                 auth.key_store, | ||||
|                 payments::PaymentUpdate, | ||||
| @ -320,10 +324,11 @@ pub async fn payment_intents_confirm( | ||||
|         state.into_inner(), | ||||
|         &req, | ||||
|         payload, | ||||
|         |state, auth, req, _| { | ||||
|         |state, auth, req, req_state| { | ||||
|             let eligible_connectors = req.connector.clone(); | ||||
|             payments::payments_core::<api_types::Authorize, api_types::PaymentsResponse, _, _, _,Oss>( | ||||
|                 state, | ||||
|                 req_state, | ||||
|                 auth.merchant_account, | ||||
|                 auth.key_store, | ||||
|                 payments::PaymentConfirm, | ||||
| @ -381,9 +386,10 @@ pub async fn payment_intents_capture( | ||||
|         state.into_inner(), | ||||
|         &req, | ||||
|         payload, | ||||
|         |state, auth, payload, _| { | ||||
|         |state, auth, payload, req_state| { | ||||
|             payments::payments_core::<api_types::Capture, api_types::PaymentsResponse, _, _, _,Oss>( | ||||
|                 state, | ||||
|                 req_state, | ||||
|                 auth.merchant_account, | ||||
|                 auth.key_store, | ||||
|                 payments::PaymentCapture, | ||||
| @ -445,9 +451,10 @@ pub async fn payment_intents_cancel( | ||||
|         state.into_inner(), | ||||
|         &req, | ||||
|         payload, | ||||
|         |state, auth, req, _| { | ||||
|         |state, auth, req, req_state| { | ||||
|             payments::payments_core::<api_types::Void, api_types::PaymentsResponse, _, _, _, Oss>( | ||||
|                 state, | ||||
|                 req_state, | ||||
|                 auth.merchant_account, | ||||
|                 auth.key_store, | ||||
|                 payments::PaymentCancel, | ||||
|  | ||||
| @ -52,7 +52,7 @@ pub async fn setup_intents_create( | ||||
|         state.into_inner(), | ||||
|         &req, | ||||
|         create_payment_req, | ||||
|         |state, auth, req, _| { | ||||
|         |state, auth, req, req_state| { | ||||
|             payments::payments_core::< | ||||
|                 api_types::SetupMandate, | ||||
|                 api_types::PaymentsResponse, | ||||
| @ -62,6 +62,7 @@ pub async fn setup_intents_create( | ||||
|                 Oss, | ||||
|             >( | ||||
|                 state, | ||||
|                 req_state, | ||||
|                 auth.merchant_account, | ||||
|                 auth.key_store, | ||||
|                 payments::PaymentCreate, | ||||
| @ -118,9 +119,10 @@ pub async fn setup_intents_retrieve( | ||||
|         state.into_inner(), | ||||
|         &req, | ||||
|         payload, | ||||
|         |state, auth, payload, _| { | ||||
|         |state, auth, payload, req_state| { | ||||
|             payments::payments_core::<api_types::PSync, api_types::PaymentsResponse, _, _, _, Oss>( | ||||
|                 state, | ||||
|                 req_state, | ||||
|                 auth.merchant_account, | ||||
|                 auth.key_store, | ||||
|                 payments::PaymentStatus, | ||||
| @ -183,7 +185,7 @@ pub async fn setup_intents_update( | ||||
|         state.into_inner(), | ||||
|         &req, | ||||
|         payload, | ||||
|         |state, auth, req, _| { | ||||
|         |state, auth, req, req_state| { | ||||
|             payments::payments_core::< | ||||
|                 api_types::SetupMandate, | ||||
|                 api_types::PaymentsResponse, | ||||
| @ -193,6 +195,7 @@ pub async fn setup_intents_update( | ||||
|                 Oss, | ||||
|             >( | ||||
|                 state, | ||||
|                 req_state, | ||||
|                 auth.merchant_account, | ||||
|                 auth.key_store, | ||||
|                 payments::PaymentUpdate, | ||||
| @ -256,7 +259,7 @@ pub async fn setup_intents_confirm( | ||||
|         state.into_inner(), | ||||
|         &req, | ||||
|         payload, | ||||
|         |state, auth, req, _| { | ||||
|         |state, auth, req, req_state| { | ||||
|             payments::payments_core::< | ||||
|                 api_types::SetupMandate, | ||||
|                 api_types::PaymentsResponse, | ||||
| @ -266,6 +269,7 @@ pub async fn setup_intents_confirm( | ||||
|                 Oss, | ||||
|             >( | ||||
|                 state, | ||||
|                 req_state, | ||||
|                 auth.merchant_account, | ||||
|                 auth.key_store, | ||||
|                 payments::PaymentConfirm, | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Sampras Lopes
					Sampras Lopes