add rounding to amount charged

This commit is contained in:
Nathan Coad
2016-07-22 15:30:00 +10:00
parent 1878fc72e1
commit 04396cda56
2 changed files with 5 additions and 5 deletions

View File

@@ -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();