I'm trying to setup a Moneris hosted pay-page, where people pay online with their credit cards. I've been having some issues with Moneris, contacted their support and advised me that the error I was getting was due to my "Total Amount" for the transaction didn't have any decimal places, and thus breaks the payment system.
Here is where I'm setting the value (if they select this radio button, the value is 1.00)
<label class="radio" for="full_registration-4">
<input type="radio" name="full_registration" id="full_registration-4" value="1.00">
Test payment - $1
</label>
This form then passes it's information to a different validation page, this is how i retrieve the variable:
$CHARGE_TOTAL = (is_numeric($_POST['full_registration']) ? (float)$_POST['full_registration'] : 395);
then, I have a hidden auto-validating form that passes all the information that Moneris requires (ie; store id, description, items, etc.)
<INPUT id="total_amount" TYPE="HIDDEN" NAME="charge_total" VALUE="<?php echo $CHARGE_TOTAL; ?>">
The variable from the initial form is 1.00, but it doesn't show up that way in Moneris, and apparently it should. I've contacted their support, and they assure me it's something to do with my code.
I've tried the variable as a double as well with the same results. I can't figure out how or why the value is being changed