Cambios en formulario de registro de usuarios

This commit is contained in:
User
2025-10-28 09:16:58 -06:00
parent 6228abd586
commit c08c9618f4
11 changed files with 257 additions and 45 deletions

View File

@@ -1,5 +1,5 @@
var apiKey="hmngy-yxZHKAcUkSHiET17TlJ_v3qrbIo5JGMr";
var apiKey = "hmngy-TGFNKK1ZDpj7fUe41OOlh9k-CoYss53A";
function stripeTokenHandler(token) {
// Insert the token ID into the form so it gets submitted to the server
@@ -14,11 +14,11 @@ function stripeTokenHandler(token) {
document.addEventListener("DOMContentLoaded", () => {
fetch(`http://127.0.0.1:8000/stripe/obtLavePublicaStripe`, {
fetch(`https://gateway.calidadbmasconsulting.com/api/obtLavePublicaStripe`, {
method: "POST",
headers: {
"Content-Type": "application/json",
Accept: "application/json",
"Accept": "application/json",
},
body: JSON.stringify({
apiKey: apiKey,
@@ -26,7 +26,7 @@ document.addEventListener("DOMContentLoaded", () => {
})
.then((response) => response.json())
.then((data) => {
console.log(data);
stripeLlave = data[0].clave_publica;
if(data[0].clave_publica==undefined || data[0].clave_publica==[])
{
@@ -113,7 +113,7 @@ form.addEventListener("submit", function (event) {
<div class='spinner-border text-warning' role='status'><span class='sr-only'></span></div>
`;
fetch("http://127.0.0.1:8000/stripe/createPayment", {
fetch("https://gateway.calidadbmasconsulting.com/api/createPayment", {
method: "POST",
headers: {
"Content-Type": "application/x-www-form-urlencoded",
@@ -147,7 +147,6 @@ form.addEventListener("submit", function (event) {
})
.catch((error) => {
//console.error("Error al obtener usuarios:", error);
showToast('Error: ApiKey no encontrado', "error");
});
});