feat(payment_link): add status page for payment link (#3213)

Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
Co-authored-by: Kashif <mohammed.kashif@juspay.in>
Co-authored-by: Kashif <kashif.dev@protonmail.com>
Co-authored-by: hrithikeshvm <hrithikeshmylatty@gmail.com>
Co-authored-by: hrithikeshvm <vmhrithikesh@gmail.com>
Co-authored-by: Sahkal Poddar <sahkalpoddar@Sahkals-MacBook-Air.local>
This commit is contained in:
Sahkal Poddar
2024-01-10 13:52:37 +05:30
committed by GitHub
parent 8decbea7e5
commit 50e4d797da
10 changed files with 642 additions and 133 deletions

View File

@ -133,19 +133,34 @@ where
.map_into_boxed_body()
}
Ok(api::ApplicationResponse::PaymenkLinkForm(payment_link_data)) => {
match api::build_payment_link_html(*payment_link_data) {
Ok(rendered_html) => api::http_response_html_data(rendered_html),
Err(_) => api::http_response_err(
r#"{
"error": {
"message": "Error while rendering payment link html page"
}
}"#,
),
Ok(api::ApplicationResponse::PaymenkLinkForm(boxed_payment_link_data)) => {
match *boxed_payment_link_data {
api::PaymentLinkAction::PaymentLinkFormData(payment_link_data) => {
match api::build_payment_link_html(payment_link_data) {
Ok(rendered_html) => api::http_response_html_data(rendered_html),
Err(_) => api::http_response_err(
r#"{
"error": {
"message": "Error while rendering payment link html page"
}
}"#,
),
}
}
api::PaymentLinkAction::PaymentLinkStatus(payment_link_data) => {
match api::get_payment_link_status(payment_link_data) {
Ok(rendered_html) => api::http_response_html_data(rendered_html),
Err(_) => api::http_response_err(
r#"{
"error": {
"message": "Error while rendering payment link status page"
}
}"#,
),
}
}
}
}
Err(error) => api::log_and_return_error_response(error),
};