3 # $Id: cust_pay.cgi,v 1.6 1999-02-28 00:03:35 ivan Exp $
5 # Usage: cust_pay.cgi invnum
6 # http://server.name/path/cust_pay.cgi?invnum
8 # some hooks for modifications as well as additions, but needs work.
10 # ivan@voicenet.com 96-dec-11
12 # rewrite ivan@sisd.com 98-mar-16
14 # $Log: cust_pay.cgi,v $
15 # Revision 1.6 1999-02-28 00:03:35 ivan
16 # removed misleading comments
18 # Revision 1.5 1999/01/25 12:09:56 ivan
19 # yet more mod_perl stuff
21 # Revision 1.4 1999/01/19 05:13:37 ivan
22 # for mod_perl: no more top-level my() variables; use vars instead
23 # also the last s/create/new/;
25 # Revision 1.3 1999/01/18 09:41:27 ivan
26 # all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl
29 # Revision 1.2 1998/12/17 06:17:03 ivan
30 # fix double // in relative URLs, s/CGI::Base/CGI/;
34 use vars qw( $cgi $invnum $p1 $_date $payby $payinfo $paid );
37 use CGI::Carp qw(fatalsToBrowser);
38 use FS::UID qw(cgisuidsetup);
39 use FS::CGI qw(header popurl);
44 if ( $cgi->param('error') ) {
45 $invnum = $cgi->param('invnum');
46 $paid = $cgi->param('paid');
47 $payby = $cgi->param('payby');
48 $payinfo = $cgi->param('payinfo');
50 my ($query) = $cgi->keywords;
60 print $cgi->header( '-expires' => 'now' ), header("Enter payment", '');
62 print qq!<FONT SIZE="+1" COLOR="#ff0000">Error: !, $cgi->param('error'),
64 if $cgi->param('error');
67 <FORM ACTION="${p1}process/cust_pay.cgi" METHOD=POST>
71 print qq!Invoice #<B>$invnum</B><INPUT TYPE="hidden" NAME="invnum" VALUE="$invnum">!;
73 print qq!<BR>Date: <B>!, time2str("%D",$_date), qq!</B><INPUT TYPE="hidden" NAME="_date" VALUE="$_date">!;
75 print qq!<BR>Amount \$<INPUT TYPE="text" NAME="paid" VALUE="$paid" SIZE=8 MAXLENGTH=8>!;
77 print qq!<BR>Payby: <B>$payby</B><INPUT TYPE="hidden" NAME="payby" VALUE="$payby">!;
79 #payinfo (check # now as payby="BILL" hardcoded.. what to do later?)
80 print qq!<BR>Check #<INPUT TYPE="text" NAME="payinfo" VALUE="$payinfo">!;
83 print qq!<INPUT TYPE="hidden" NAME="paybatch" VALUE="">!;
88 <INPUT TYPE="submit" VALUE="Post payment">