card verification working
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user