mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-28 20:23:43 +08:00
feat(router): add payment failed webhook event (#305)
This commit is contained in:
@ -935,6 +935,7 @@ impl api::IncomingWebhook for Stripe {
|
||||
.change_context(errors::ConnectorError::WebhookEventTypeNotFound)?;
|
||||
|
||||
Ok(match details.event_type.as_str() {
|
||||
"payment_intent.payment_failed" => api::IncomingWebhookEvent::PaymentIntentFailure,
|
||||
"payment_intent.succeeded" => api::IncomingWebhookEvent::PaymentIntentSuccess,
|
||||
_ => Err(errors::ConnectorError::WebhookEventTypeNotFound).into_report()?,
|
||||
})
|
||||
|
||||
@ -31,7 +31,7 @@ use crate::{
|
||||
utils::{
|
||||
self,
|
||||
crypto::{self, SignMessage},
|
||||
OptionExt, ValueExt,
|
||||
OptionExt,
|
||||
},
|
||||
};
|
||||
|
||||
@ -658,8 +658,9 @@ pub async fn get_connector_default(
|
||||
.parse_value("CustomRoutingRulesVec")
|
||||
.change_context(errors::ConnectorError::RoutingRulesParsingError)
|
||||
.change_context(errors::ApiErrorResponse::InternalServerError)?;
|
||||
let custom_routing_rules: api::CustomRoutingRules = vec_val[0]
|
||||
.clone()
|
||||
let custom_routing_rules: api::CustomRoutingRules = vec_val
|
||||
.first()
|
||||
.cloned()
|
||||
.parse_value("CustomRoutingRules")
|
||||
.change_context(errors::ConnectorError::RoutingRulesParsingError)
|
||||
.change_context(errors::ApiErrorResponse::InternalServerError)?;
|
||||
|
||||
Reference in New Issue
Block a user