mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-30 17:47:54 +08:00
feat(core): accept gateway credentials in the request body in payments and refunds (#766)
This commit is contained in:
@ -50,6 +50,7 @@ async fn payments_incoming_webhook_flow<W: api::OutgoingWebhookType>(
|
||||
force_sync: true,
|
||||
connector: None,
|
||||
param: None,
|
||||
merchant_connector_details: None,
|
||||
},
|
||||
services::AuthFlow::Merchant,
|
||||
consume_or_trigger_flow,
|
||||
@ -157,15 +158,22 @@ async fn refunds_incoming_webhook_flow<W: api::OutgoingWebhookType>(
|
||||
)
|
||||
})?
|
||||
} else {
|
||||
refunds::refund_retrieve_core(&state, merchant_account.clone(), refund_id.to_owned())
|
||||
.await
|
||||
.change_context(errors::WebhooksFlowError::RefundsCoreFailed)
|
||||
.attach_printable_lazy(|| {
|
||||
format!(
|
||||
"Failed while updating refund: refund_id: {}",
|
||||
refund_id.to_owned()
|
||||
)
|
||||
})?
|
||||
refunds::refund_retrieve_core(
|
||||
&state,
|
||||
merchant_account.clone(),
|
||||
api_models::refunds::RefundsRetrieveRequest {
|
||||
refund_id: refund_id.to_owned(),
|
||||
merchant_connector_details: None,
|
||||
},
|
||||
)
|
||||
.await
|
||||
.change_context(errors::WebhooksFlowError::RefundsCoreFailed)
|
||||
.attach_printable_lazy(|| {
|
||||
format!(
|
||||
"Failed while updating refund: refund_id: {}",
|
||||
refund_id.to_owned()
|
||||
)
|
||||
})?
|
||||
};
|
||||
let event_type: enums::EventType = updated_refund
|
||||
.refund_status
|
||||
|
||||
Reference in New Issue
Block a user