mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-02 21:07:58 +08:00
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:
@ -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),
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user