use Text::Template;
use HTML::Entities;
use Date::Format;
+use Number::Format 1.50;
use FS::SelfService qw( login customer_info invoice
payment_info process_payment
process_prepay
#the rest, it gives better error messages
$cgi->param('amount') =~ /^\s*(\d+(\.\d{2})?)\s*$/
- or die "illegal amount"; #!!!
+ or die "Illegal amount: ". $cgi->param('amount'); #!!!
my $amount = $1;
my $payinfo = $cgi->param('payinfo');