diff --git a/crates/router/src/core/payment_link/payment_link_initiate/payment_link.js b/crates/router/src/core/payment_link/payment_link_initiate/payment_link.js index 9acfc8bfec..3e262b45df 100644 --- a/crates/router/src/core/payment_link/payment_link_initiate/payment_link.js +++ b/crates/router/src/core/payment_link/payment_link_initiate/payment_link.js @@ -188,7 +188,10 @@ var hyper = null; * - Initialize event listeners for updating UI on screen size changes * - Initialize SDK **/ + + function boot() { + // @ts-ignore var paymentDetails = window.__PAYMENT_DETAILS; var orderDetails = paymentDetails.order_details; diff --git a/crates/router/src/services/api.rs b/crates/router/src/services/api.rs index 2cc3670ddd..a4c6bdd0a1 100644 --- a/crates/router/src/services/api.rs +++ b/crates/router/src/services/api.rs @@ -1449,7 +1449,8 @@ pub fn build_redirection_form( config: Settings, ) -> maud::Markup { use maud::PreEscaped; - + let logging_template = + include_str!("redirection/assets/redirect_error_logs_push.js").to_string(); match form { RedirectForm::Form { endpoint, @@ -1506,11 +1507,15 @@ pub fn build_redirection_form( } } - (PreEscaped(r#""#)) + (PreEscaped(format!(""))) + } } }, - RedirectForm::Html { html_data } => PreEscaped(html_data.to_string()), + RedirectForm::Html { html_data } => PreEscaped(format!( + "{} ", + html_data, logging_template + )), RedirectForm::BlueSnap { payment_fields_token, } => { @@ -1557,6 +1562,7 @@ pub fn build_redirection_form( } (PreEscaped(format!(""#)) (PreEscaped(format!(""#)) + }} + "))) }} } RedirectForm::Payme => { @@ -1682,7 +1690,8 @@ pub fn build_redirection_form( head { (PreEscaped(r#""#)) } - (PreEscaped(" - ".to_string())) + "))) } } RedirectForm::Braintree { @@ -1741,6 +1750,7 @@ pub fn build_redirection_form( } (PreEscaped(format!("