% % my %type = ( 'CARD' => 'credit card', % 'CHEK' => 'electronic check (ACH)', % ); % % $cgi->param('payby') =~ /^(CARD|CHEK)$/ % or die "unknown payby ". $cgi->param('payby'); % my $payby = $1; % % $cgi->param('custnum') =~ /^(\d+)$/ % or die "illegal custnum ". $cgi->param('custnum'); % my $custnum = $1; % % my $cust_main = qsearchs( 'cust_main', { 'custnum'=>$custnum } ); % die "unknown custnum $custnum" unless $cust_main; % % my $balance = $cust_main->balance; % % my $payinfo = ''; % % #false laziness w/selfservice make_payment.html shortcut for one-country % my $conf = new FS::Conf; % my %states = map { $_->state => 1 } % qsearch('cust_main_county', { % 'country' => $conf->config('countrydefault') || 'US' % } ); % my @states = sort { $a cmp $b } keys %states; % % my $paybatch = "webui-payment-". time. "-$$-". rand() * 2**32; % % <% include( '/elements/header.html', "Process $type{$payby} payment" ) %> <% include( '/elements/small_custview.html', $cust_main ) %>
<% include('/elements/footer.html') %>