{"id":153864,"date":"2024-01-19T11:08:37","date_gmt":"2024-01-19T10:08:37","guid":{"rendered":"https:\/\/pre.juegaterapia.org\/?page_id=153864"},"modified":"2024-04-08T17:51:02","modified_gmt":"2024-04-08T15:51:02","slug":"actualizar-tarjeta","status":"publish","type":"page","link":"https:\/\/pre.juegaterapia.org\/it\/colabora\/actualizar-tarjeta\/","title":{"rendered":"Actualizar Tarjeta"},"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; \">\u00bfQuieres actualizar los datos de tu tarjeta bancaria?<\/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;\">Los datos no son correctos, por favor revisa que la URL sea la proporcionada por 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()\">Aceptar<\/button>\n   <button id=\"btn_cancelar\" class= \"btn\" style=\"display: inline-block; margin-top: 1em;\" type=\"button\"><a href=\"https:\/\/pre.juegaterapia.org\/it\/\" style=\"color: inherit; text-decoration: inherit;\">Cancelar<\/a><\/button>\n<\/div>\n<input type=\"hidden\" name=\"trp-form-language\" value=\"it\"\/><\/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>Aviso<\/b><\/p>\n<p>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 ponga en contacto con <a href=\"mailto:mcavanilles@juegaterapia.org\">mcavanilles@juegaterapia.org<\/a> para que le proporcione el enlace con los datos.<\/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-content\/plugins\/card-change-settings\/card-change-settings.php\",\n                data: { user_id: id, user_hash: hash},\n                cache: false,\n                success: function (data) {\n                    if(data != false){\n                        console.log(\"El servidor devolvi\u00f3:\");\n                        var json_datos = JSON.parse(data);\n                        \/\/console.log(json_datos);\n                        document.getElementById(\"form_card_change\").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                        \/\/ Hacer env\u00edo si todo va bien\n                        if(json_datos['Existe']){\n                            $('#form_card_change').submit();\n                        }\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>","protected":false},"author":155,"featured_media":0,"parent":402,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"inline_featured_image":false,"_themeisle_gutenberg_block_has_review":false,"footnotes":""},"class_list":["post-153864","page","type-page","status-publish","hentry"],"acf":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/pre.juegaterapia.org\/it\/wp-json\/wp\/v2\/pages\/153864","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pre.juegaterapia.org\/it\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/pre.juegaterapia.org\/it\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/pre.juegaterapia.org\/it\/wp-json\/wp\/v2\/users\/155"}],"replies":[{"embeddable":true,"href":"https:\/\/pre.juegaterapia.org\/it\/wp-json\/wp\/v2\/comments?post=153864"}],"version-history":[{"count":121,"href":"https:\/\/pre.juegaterapia.org\/it\/wp-json\/wp\/v2\/pages\/153864\/revisions"}],"predecessor-version":[{"id":154104,"href":"https:\/\/pre.juegaterapia.org\/it\/wp-json\/wp\/v2\/pages\/153864\/revisions\/154104"}],"up":[{"embeddable":true,"href":"https:\/\/pre.juegaterapia.org\/it\/wp-json\/wp\/v2\/pages\/402"}],"wp:attachment":[{"href":"https:\/\/pre.juegaterapia.org\/it\/wp-json\/wp\/v2\/media?parent=153864"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}