summaryrefslogtreecommitdiff
path: root/fs_selfservice
diff options
context:
space:
mode:
authorivan <ivan>2003-05-19 13:54:55 +0000
committerivan <ivan>2003-05-19 13:54:55 +0000
commite2a51e422dbd070a4571f229f8e5c6929950d137 (patch)
tree911d865494d3176b6b81733a6c97e73c47bb5f62 /fs_selfservice
parenta1295d0682aa81a408abe06fcaa7c14440f6a2e2 (diff)
fix up some bugs in processing payments via self-service... appears to be
working so far
Diffstat (limited to 'fs_selfservice')
-rw-r--r--fs_selfservice/FS-SelfService/SelfService.pm17
-rw-r--r--fs_selfservice/FS-SelfService/cgi/make_payment.html4
-rw-r--r--fs_selfservice/FS-SelfService/cgi/selfservice.cgi7
3 files changed, 15 insertions, 13 deletions
diff --git a/fs_selfservice/FS-SelfService/SelfService.pm b/fs_selfservice/FS-SelfService/SelfService.pm
index c561dabdb..5849b28d1 100644
--- a/fs_selfservice/FS-SelfService/SelfService.pm
+++ b/fs_selfservice/FS-SelfService/SelfService.pm
@@ -16,14 +16,15 @@ $VERSION = '0.03';
$socket = "/usr/local/freeside/selfservice_socket";
%autoload = (
- 'passwd' => 'passwd/passwd',
- 'chfn' => 'passwd/passwd',
- 'chsh' => 'passwd/passwd',
- 'login' => 'MyAccount/login',
- 'customer_info' => 'MyAccount/customer_info',
- 'invoice' => 'MyAccount/invoice',
- 'cancel' => 'MyAccount/cancel',
- 'payment_info' => 'MyAccount/payment_info',
+ 'passwd' => 'passwd/passwd',
+ 'chfn' => 'passwd/passwd',
+ 'chsh' => 'passwd/passwd',
+ 'login' => 'MyAccount/login',
+ 'customer_info' => 'MyAccount/customer_info',
+ 'invoice' => 'MyAccount/invoice',
+ 'cancel' => 'MyAccount/cancel',
+ 'payment_info' => 'MyAccount/payment_info',
+ 'process_payment' => 'MyAccount/process_payment',
);
@EXPORT_OK = keys %autoload;
diff --git a/fs_selfservice/FS-SelfService/cgi/make_payment.html b/fs_selfservice/FS-SelfService/cgi/make_payment.html
index fdb411b11..1d860f08a 100644
--- a/fs_selfservice/FS-SelfService/cgi/make_payment.html
+++ b/fs_selfservice/FS-SelfService/cgi/make_payment.html
@@ -8,7 +8,7 @@
<FONT SIZE=4>Make a payment</FONT><BR><BR>
<FORM NAME="OneTrueForm" METHOD="POST" ACTION="<%=$selfurl%>" onSubmit="document.OneTrueForm.process.disabled=true">
<INPUT TYPE="hidden" NAME="session" VALUE="<%=$session_id%>">
-<INPUT TYPE="hidden" NAME="action" VALUE="process_payment">
+<INPUT TYPE="hidden" NAME="action" VALUE="do_payment">
<TABLE BGCOLOR="#cccccc">
<TR>
<TD ALIGN="right">Amount&nbsp;Due</TD>
@@ -110,7 +110,7 @@
</TR>
</TABLE>
<BR>
-<INPUT TYPE="hidden" NAME="paybatch" VALUE="$paybatch">
+<INPUT TYPE="hidden" NAME="paybatch" VALUE="<%=$paybatch%>">
<INPUT TYPE="submit" NAME="process" VALUE="Process payment"> <!-- onClick="this.disabled=true"> -->
</FORM>
</TD></TR></TABLE>
diff --git a/fs_selfservice/FS-SelfService/cgi/selfservice.cgi b/fs_selfservice/FS-SelfService/cgi/selfservice.cgi
index d43df4041..456d2dde2 100644
--- a/fs_selfservice/FS-SelfService/cgi/selfservice.cgi
+++ b/fs_selfservice/FS-SelfService/cgi/selfservice.cgi
@@ -6,7 +6,8 @@ use subs qw(do_template);
use CGI;
use CGI::Carp qw(fatalsToBrowser);
use Text::Template;
-use FS::SelfService qw(login customer_info invoice payment_info);
+use FS::SelfService qw( login customer_info invoice payment_info
+ process_payment );
$template_dir = '.';
@@ -54,7 +55,7 @@ if ( $cgi->param('session') eq 'login' ) {
$session_id = $cgi->param('session');
$cgi->param('action') =~
- /^(myaccount|view_invoice|make_payment|process_payment)$/
+ /^(myaccount|view_invoice|make_payment|do_payment)$/
or die "unknown action ". $cgi->param('action');
my $action = $1;
@@ -94,7 +95,7 @@ sub make_payment {
payment_info( 'session_id' => $session_id );
}
-sub process_payment {
+sub do_payment {
use Business::CreditCard;