Commit 1a59a59a authored by Raul Granados's avatar Raul Granados

show messages errors

parent d84220ef
......@@ -6,6 +6,7 @@ Conekta.setPublicKey('key_B34Yd1rcLM2Pyxpg');
$form.append($('<input type="hidden" name="conektaTokenId" id="conektaTokenId">').val(token.id));
$form.get(0).submit(); //Submit
};
var conektaErrorResponseHandler = function(response) {
var $form = $("#card-form");
$form.find(".card-errors").text(response.message_to_purchaser);
......@@ -21,4 +22,5 @@ Conekta.setPublicKey('key_B34Yd1rcLM2Pyxpg');
Conekta.Token.create($form, conektaSuccessResponseHandler, conektaErrorResponseHandler);
return false;
});
});
\ No newline at end of file
......@@ -17,6 +17,7 @@
<p>Payment with card!</p>
</div>
<form action="payment.php" method="POST" id="card-form">
<span class="card-errors"></span>
<div class="products">
<h3 class="title">Checkout</h3>
<div class="item">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment