Created
August 13, 2020 04:06
-
-
Save gusLopezC/837eca1cab9830f9d73c3fabc69122b2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.ajax({ | |
type: 'POST', //aqui puede ser igual get | |
url: 'procesos/crearPago.php', //aqui va tu direccion donde esta tu funcion php | |
data: data, //aqui tus datos | |
success: function(response) { | |
// | |
var jsonData2 = JSON.parse(response); | |
var resp = JSON.parse(jsonData2.charge); | |
console.log(jsonData2); | |
console.log(resp); | |
if (x.style.display === "none") { | |
x.style.display = "block"; | |
} else { | |
x.style.display = "none"; | |
} | |
document.getElementById('content').innerHTML += '<div>' + resp + ' </div>'; | |
}, | |
error: function(data) { | |
console.log(JSON.stringify(response)); | |
console.log("bad"); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment