Skip to content

Open source, composable payments platform | PCI compliant | SaaS and Self-host options | Enables connectivity to multiple payment, payout, fraud, vault and tokenization providers | Uplifts authorization with intelligent routing and revenue recovery | Reduce payment processing costs with cost observability | Reduces payment ops with reconciliation

fix(router): read form method using getAttribute instead of property access (#10278)

AkshayaFoiger5923c1b8a5df
diff --git a/crates/router/src/services/api.rs b/crates/router/src/services/api.rs
index 33dfa5d53d..98066a4d04 100644
--- a/crates/router/src/services/api.rs
+++ b/crates/router/src/services/api.rs
@@ -910,7 +910,7 @@ pub fn build_redirection_form(
var frm = document.getElementById("payment_form");
var formFields = frm.querySelectorAll("input");
- if (frm.method.toUpperCase() === "GET" && formFields.length === 0) {{
+ if (((frm.getAttribute("method") || "GET").toUpperCase()) === "GET" && formFields.length === 0) {{
window.setTimeout(function () {{
window.location.href = frm.action;
}}, 300);