js testing for amex
This commit is contained in:
@@ -23,6 +23,11 @@ jQuery(document).ready(function($) {
|
||||
}
|
||||
});
|
||||
|
||||
//attempt to update amount for amex cards
|
||||
$('#card_number').blur(function() {
|
||||
console.log(['Card field lost focus', $(this).attr('class')]);
|
||||
});
|
||||
|
||||
$('.form-submit').click(function (e) {
|
||||
//currentForm = $(this).closest('form');
|
||||
//if (currentForm === undefined)
|
||||
@@ -37,6 +42,7 @@ jQuery(document).ready(function($) {
|
||||
//alert($(':input[name="description"]', $stripeForm));
|
||||
|
||||
//set the amount dynamically based on the card brand from the token
|
||||
//this doesn't actually work since card_brand isn't set yet
|
||||
if ($(':input[name="card_brand"]', $stripeForm).val() == 'American Express') {
|
||||
var $amount = $(':input[name="foreign_gross_amount"]', $stripeForm).val() * 100;
|
||||
}
|
||||
@@ -58,7 +64,7 @@ jQuery(document).ready(function($) {
|
||||
e.preventDefault();
|
||||
});
|
||||
// Close Checkout on page navigation
|
||||
//$(window).on('popstate', function() {
|
||||
// handler.close();
|
||||
//});
|
||||
$(window).on('popstate', function() {
|
||||
handler.close();
|
||||
});
|
||||
});
|
Reference in New Issue
Block a user