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

@@ -71,8 +71,8 @@ function booking_stripe_form($node, &$form_state, $person, $invoiceid, $net_amou
'description' => $event->booking_eventname . ' ' . $person->booking_price_descrip,
'invoice' => $invoiceid,
'amount' => $net_amount_owing,
'gross_amount' => _booking_add_stripe_fees($net_amount_owing, $person->booking_country),
'foreign_gross_amount' => _booking_add_stripe_fees($net_amount_owing, 'FakeCountry'),
'gross_amount' => number_format(_booking_add_stripe_fees($net_amount_owing, $person->booking_country), 2, '.', ''),
'foreign_gross_amount' => number_format(_booking_add_stripe_fees($net_amount_owing, 'FakeCountry'), 2, '.', ''),
'last_name' => $person->booking_lastname,
'first_name' => $person->booking_firstname,
'uuid' => $person->booking_tempid,

View File

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