Private
Public Access
1
0

card verification working

This commit is contained in:
Sander Roosendaal
2019-07-23 19:11:43 +02:00
parent 6ec8bfc03b
commit 3f56d1ec70
4 changed files with 15 additions and 5 deletions

View File

@@ -3,6 +3,7 @@
<script>
var form = document.querySelector('#payment-form');
var hiddenNonceInput = document.querySelector('#nonce');
var paymenterrordiv = document.getElementById("paymenterror");
var client_token = '{{ client_token }}';
braintree.dropin.create({
authorization: client_token,
@@ -28,7 +29,8 @@
} else {
// Decide if you will force the user to enter a different
// payment method if liablity was not shifted
dropinInstance.clearSelectedPaymentMethod();
instance.clearSelectedPaymentMethod();
paymenterrordiv.innerHTML = '<p class="message">3D Secure Card Verification Error. Please check your card details.</p>';
}
});
@@ -42,5 +44,5 @@
$('#payment-form').submit(function() {
$(this).find("button[type='submit']").prop('disabled',true);
console.log("disabled");
}
});
</script>