add rounding to amount charged
This commit is contained in:
@@ -38,10 +38,10 @@ jQuery(document).ready(function($) {
|
||||
|
||||
//set the amount dynamically based on the card brand from the token
|
||||
if ($(':input[name="card_brand"]', $stripeForm).val() == 'American Express') {
|
||||
var $amount = $(':input[name="foreign_gross_amount"]', $stripeForm).val() * 100;
|
||||
var $amount = $(':input[name="foreign_gross_amount"]', $stripeForm).val() * 100;
|
||||
}
|
||||
else {
|
||||
var $amount = $(':input[name="gross_amount"]', $stripeForm).val() * 100;
|
||||
var $amount = $(':input[name="gross_amount"]', $stripeForm).val() * 100;
|
||||
}
|
||||
|
||||
handler.open({
|
||||
@@ -49,7 +49,7 @@ jQuery(document).ready(function($) {
|
||||
currency: "aud",
|
||||
description: $(':input[name="description"]', $stripeForm).val(),
|
||||
email: $(':input[name="email"]', $stripeForm).val(),
|
||||
amount: $amount,
|
||||
amount: Math.round($amount),
|
||||
zipCode: true,
|
||||
closed: function() {
|
||||
//document.getElementById("booking_stripe_form").submit();
|
||||
|
Reference in New Issue
Block a user