refactor(refunds): refactor refunds create to check for unintended 5xx (#1332)

Co-authored-by: Nitesh Balla <nitesh.balla@juspay.in>
Co-authored-by: Arun Raj M <jarnura47@gmail.com>
This commit is contained in:
Abhishek Marrivagu
2023-06-23 15:46:18 +05:30
committed by GitHub
parent 6ec6272f2a
commit ff17b62dc2
2 changed files with 23 additions and 23 deletions

View File

@ -58,7 +58,8 @@ pub async fn construct_refund_router_data<'a, F>(
let payment_method_type = payment_attempt
.payment_method
.get_required_value("payment_method_type")?;
.get_required_value("payment_method_type")
.change_context(errors::ApiErrorResponse::InternalServerError)?;
let webhook_url = Some(helpers::create_webhook_url(
&state.conf.server.base_url.clone(),