{"id":170865,"date":"2024-04-08T13:12:04","date_gmt":"2024-04-08T11:12:04","guid":{"rendered":"https:\/\/www.juegaterapia.org\/?page_id=170865"},"modified":"2026-03-25T14:59:09","modified_gmt":"2026-03-25T13:59:09","slug":"update-card","status":"publish","type":"page","link":"https:\/\/www.juegaterapia.org\/en\/actualizar-tarjeta\/","title":{"rendered":"Update Card"},"content":{"rendered":"<div class=\"container\" style=\"width: 100%; max-width: 520px; display: flex; flex-direction: column; margin-top: 2em;\">\n<h3 style=\"margin-left: 20px; text-align: center; \">Do you want to update your bank card details?<\/h3>\n   <p id=\"user_id\"  style=\"display: none;\"><\/p>\n   <p id=\"user_hash\"  style=\"display: none;\"><\/p>\n   <p id=\"mensaje_error\" style=\"font-size: 1.2em; font-weight: 400; margin-left: 20px; margin-top: 1.5em; color: red; text-align: center; visibility: hidden; opacity: 0; transition: visibility 0s, opacity 0.5s linear;\">The data is not correct, please check that the URL is the one provided by Juegaterapia.<\/p>\n<form id=\"form_card_change\" name=\"frm\" action=\"\" method=\"POST\" target=\"_self\" data-trp-original-action=\"\">   \n   <input id=\"Ds_SignatureVersion\" type=\"text\" name=\"Ds_SignatureVersion\" style=\"display: none;\"\/><\/br>\n   <input id=\"Ds_MerchantParameters\" type=\"text\" name=\"Ds_MerchantParameters\" style=\"display: none;\"\/><\/br>\n   <input id=\"Ds_Signature\" type=\"text\" name=\"Ds_Signature\" style=\"display: none;\"\/><\/br>\n<div style=\"margin-top: 25px; display: flex; justify-content: center; flex-wrap: wrap; gap: 6.2em;\">\n   <button id=\"btn_comprobar\" class= \"btn\" style=\"display: inline-block; margin-top: 1em; padding:\" type=\"button\" onclick=\"comprobar()\">Accept<\/button>\n   <button id=\"btn_cancelar\" class= \"btn\" style=\"display: inline-block; margin-top: 1em;\" type=\"button\"><a href=\"https:\/\/juegaterapia.org\/\" style=\"color: inherit; text-decoration: inherit;\">Cancel<\/a><\/button>\n<\/div>\n<input type=\"hidden\" name=\"trp-form-language\" value=\"en\"\/><\/form>\n\n<div style=\"margin-left: 20px; margin-top: 2.75em; border: 3px solid red; padding:15px 25px; border-radius: 0.5em;\">\n<p style=\"color: red; margin-bottom:7px;\"><b>Notice<\/b><\/p>\n<p>If you have reached this page, without selecting the URL provided by one of our mailings, you will not have the necessary keys to make the change. Please contact <a href=\"mailto:mcavanilles@juegaterapia.org\">mcavanilles@juegaterapia.org<\/a> to provide you with the link to the data.<\/p><\/div>\n<\/div>\n\n<script>\n    \/*SCRIPTS DE ANOVA*\/\n    var queryParams= new URLSearchParams(window.location.search);\n    \/\/Obtener los datos de la URL si se ha accedido de esta forma\n    if(queryParams.has(\"id\")) {\n        var user_id = queryParams.get(\"id\");\n        document.getElementById(\"user_id\").innerHTML= user_id ;\n        \/\/\n        var user_hash = queryParams.get(\"hash\");\n        document.getElementById(\"user_hash\").innerHTML= user_hash;\n    }\n   \n    function comprobar() {\n        var id = document.getElementById(\"user_id\").innerHTML;\n        var hash = document.getElementById(\"user_hash\").innerHTML;\n        if (id != \"\" && hash != \"\") {\n            try{\n            jQuery.ajax({\n                type: \"POST\",\n                url: \"\/wp-json\/card-change\/v1\/process\",\n                data: { user_id: id, user_hash: hash},\n                cache: false,\n                success: function (data) {\n                    \/\/ Al usar la REST API, 'data' ya es un objeto JSON parseado.\n                    var json_datos = data;\n\n                    if(json_datos && json_datos.Existe){\n                        console.log(\"Datos recibidos correctamente, redirigiendo a Redsys...\");\n                        \n                        var form = document.getElementById(\"form_card_change\");\n                        form.action = json_datos.tpvurl;\n                        document.getElementById(\"Ds_SignatureVersion\").value = json_datos.Ds_SignatureVersion;\n                        document.getElementById(\"Ds_MerchantParameters\").value = json_datos.Ds_MerchantParameters;\n                        document.getElementById(\"Ds_Signature\").value = json_datos.Ds_Signature;\n                        \n                        \/\/ Hacer env\u00edo si todo va bien\n                        form.submit();\n                        \n                    }else{\n                       \/\/console.log(\"False. El servidor devolvi\u00f3: %s\", data);\n                       document.getElementById(\"mensaje_error\").style.visibility= \"visible\";\n                       document.getElementById(\"mensaje_error\").style.opacity= \"1\";\n                    }\n                },\n                error: function (request,status,error) {\n                    \/\/console.log(\"Error %s. Con status \\(%s\\) El servidor devolvi\u00f3: %s\", request, status, error);\n                    document.getElementById(\"mensaje_error\").style.visibility= \"visible\";\n                    document.getElementById(\"mensaje_error\").style.opacity= \"1\";\n                }\n                }); \n            } catch(e){\n                \/\/console.log(\"Error \\(try catch\\). El servidor devolvi\u00f3: %s\", e);\n                document.getElementById(\"mensaje_error\").style.visibility= \"visible\";\n                document.getElementById(\"mensaje_error\").style.opacity= \"1\";\n            }\n        } else{\n             document.getElementById(\"mensaje_error\").style.visibility= \"visible\";\n             document.getElementById(\"mensaje_error\").style.opacity= \"1\";\n        }\n    }\n    \/*FIN SCRIPTS DE ANOVA*\/\n<\/script>","protected":false},"excerpt":{"rendered":"<p>\u00bfQuieres actualizar los datos de tu tarjeta bancaria? Los datos no son correctos, por favor revisa que la URL sea la proporcionada por Juegaterapia Aceptar Cancelar Aviso Si has llegado a esta p\u00e1gina, sin seleccionar la URL proporcionada por uno de nuestro correo, no tendr\u00e1s las claves necesarias para realizar el cambio. Le rogamos se [&hellip;]<\/p>\n","protected":false},"author":155,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"inline_featured_image":false,"_themeisle_gutenberg_block_has_review":false,"footnotes":""},"class_list":["post-170865","page","type-page","status-publish","hentry"],"acf":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.juegaterapia.org\/en\/wp-json\/wp\/v2\/pages\/170865","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.juegaterapia.org\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.juegaterapia.org\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.juegaterapia.org\/en\/wp-json\/wp\/v2\/users\/155"}],"replies":[{"embeddable":true,"href":"https:\/\/www.juegaterapia.org\/en\/wp-json\/wp\/v2\/comments?post=170865"}],"version-history":[{"count":3,"href":"https:\/\/www.juegaterapia.org\/en\/wp-json\/wp\/v2\/pages\/170865\/revisions"}],"predecessor-version":[{"id":209846,"href":"https:\/\/www.juegaterapia.org\/en\/wp-json\/wp\/v2\/pages\/170865\/revisions\/209846"}],"wp:attachment":[{"href":"https:\/\/www.juegaterapia.org\/en\/wp-json\/wp\/v2\/media?parent=170865"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}