<?php #####################################
function _convertToWireCardPrice($price) {
//checking the syntax and format
$price = strval($price);
if(eregi('^[0-9]{1,}[.]{1}[0-9]{2}$', $price)) {
/* format is valid */
$price = eregi_replace(".", "", $price); // removing the .dot
return $price;
} else {
echo "Incorrect number format for transactions via the Wire Card C3 ("$price").<br />";
exit;
}
} ##################################### ?>
|
|