freeside/fs_selfservice/FS-SelfService/cgi recharge_prepay.html,NONE,1.1 recharge_results.html,NONE,1.1 agent_delete_svc.html,1.1,1.2 delete_svc.html,1.1,1.2 make_payment.html,1.11,1.12 myaccount.html,1.5,1.6 myaccount_menu.html,1.1,1.2 payment_results.html,1.2,1.3 process_svc_acct.html,1.1,1.2 process_svc_external.html,1.1,1.2 provision.html,1.2,1.3 provision_svc_acct.html,1.2,1.3 view_invoice.html,1.3,1.4 selfservice.cgi,1.10,1.11
Ivan Kohler
ivan at pouncequick.420.am
Wed Jun 8 02:03:10 PDT 2005
Update of /home/cvs/cvsroot/freeside/fs_selfservice/FS-SelfService/cgi
In directory pouncequick:/tmp/cvs-serv25069/fs_selfservice/FS-SelfService/cgi
Modified Files:
agent_delete_svc.html delete_svc.html make_payment.html
myaccount.html myaccount_menu.html payment_results.html
process_svc_acct.html process_svc_external.html provision.html
provision_svc_acct.html view_invoice.html selfservice.cgi
Added Files:
recharge_prepay.html recharge_results.html
Log Message:
prepaid card recharge
Index: selfservice.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/fs_selfservice/FS-SelfService/cgi/selfservice.cgi,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- selfservice.cgi 17 Oct 2004 14:01:47 -0000 1.10
+++ selfservice.cgi 8 Jun 2005 09:03:06 -0000 1.11
@@ -9,6 +9,7 @@
use HTML::Entities;
use FS::SelfService qw( login customer_info invoice
payment_info process_payment
+ process_prepay
list_pkgs
part_svc_info provision_acct provision_external
unprovision_svc
@@ -61,7 +62,7 @@
#order|pw_list XXX ???
$cgi->param('action') =~
- /^(myaccount|view_invoice|make_payment|payment_results|logout|change_bill|change_ship|provision|provision_svc|process_svc_acct|process_svc_external|delete_svc)$/
+ /^(myaccount|view_invoice|make_payment|payment_results|recharge_prepay|recharge_results|logout|change_bill|change_ship|provision|provision_svc|process_svc_acct|process_svc_external|delete_svc)$/
or die "unknown action ". $cgi->param('action');
my $action = $1;
@@ -79,6 +80,7 @@
warn "processing template $action\n";
do_template($action, {
'session_id' => $session_id,
+ 'action' => $action, #so the menu knows what tab we're on...
%{$result}
});
@@ -171,6 +173,22 @@
'paybatch' => $paybatch,
);
+}
+
+sub recharge_prepay {
+ customer_info( 'session_id' => $session_id );
+}
+
+sub recharge_results {
+
+ my $prepaid_cardnum = $cgi->param('prepaid_cardnum');
+ $prepaid_cardnum =~ s/\W//g;
+ $prepaid_cardnum =~ /^(\w*)$/ or die "illegal prepaid card number";
+ $prepaid_cardnum = $1;
+
+ process_prepay ( 'session_id' => $session_id,
+ 'prepaid_cardnum' => $prepaid_cardnum,
+ );
}
sub logout {
Index: process_svc_external.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/fs_selfservice/FS-SelfService/cgi/process_svc_external.html,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- process_svc_external.html 17 Oct 2004 14:01:47 -0000 1.1
+++ process_svc_external.html 8 Jun 2005 09:03:06 -0000 1.2
@@ -1,7 +1,6 @@
<HTML><HEAD><TITLE><%= $error ? 'MyAccount' : sprintf("Your serial number is %010d-$title", $id) %></TITLE></HEAD>
<BODY BGCOLOR="#eeeeee"><FONT SIZE=5>MyAccount</FONT><BR><BR>
<%= $url = "$selfurl?session=$session_id;action="; ''; %>
-<TABLE BORDER=0 CELLPADDING=4><TR>
<%= include('myaccount_menu') %>
<TD VALIGN="top">
Index: payment_results.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/fs_selfservice/FS-SelfService/cgi/payment_results.html,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- payment_results.html 15 Jul 2004 22:40:00 -0000 1.2
+++ payment_results.html 8 Jun 2005 09:03:06 -0000 1.3
@@ -1,7 +1,6 @@
<HTML><HEAD><TITLE>MyAccount</TITLE></HEAD>
<BODY BGCOLOR="#eeeeee"><FONT SIZE=5>MyAccount</FONT><BR><BR>
<%= $url = "$selfurl?session=$session_id;action="; ''; %>
-<TABLE BORDER=0 CELLPADDING=4><TR>
<%= include('myaccount_menu') %>
<TD VALIGN="top">
<FONT SIZE=4>Payment results</FONT><BR><BR>
Index: make_payment.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/fs_selfservice/FS-SelfService/cgi/make_payment.html,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- make_payment.html 15 Jul 2004 22:40:00 -0000 1.11
+++ make_payment.html 8 Jun 2005 09:03:06 -0000 1.12
@@ -1,7 +1,6 @@
<HTML><HEAD><TITLE>MyAccount</TITLE></HEAD>
<BODY BGCOLOR="#eeeeee"><FONT SIZE=5>MyAccount</FONT><BR><BR>
<%= $url = "$selfurl?session=$session_id;action="; ''; %>
-<TABLE BORDER=0 CELLPADDING=4><TR>
<%= include('myaccount_menu') %>
<TD VALIGN="top">
<FONT SIZE=4>Make a payment</FONT><BR><BR>
Index: process_svc_acct.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/fs_selfservice/FS-SelfService/cgi/process_svc_acct.html,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- process_svc_acct.html 15 Jul 2004 22:40:00 -0000 1.1
+++ process_svc_acct.html 8 Jun 2005 09:03:06 -0000 1.2
@@ -1,7 +1,6 @@
<HTML><HEAD><TITLE>MyAccount</TITLE></HEAD>
<BODY BGCOLOR="#eeeeee"><FONT SIZE=5>MyAccount</FONT><BR><BR>
<%= $url = "$selfurl?session=$session_id;action="; ''; %>
-<TABLE BORDER=0 CELLPADDING=4><TR>
<%= include('myaccount_menu') %>
<TD VALIGN="top">
Index: delete_svc.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/fs_selfservice/FS-SelfService/cgi/delete_svc.html,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- delete_svc.html 15 Jul 2004 22:40:00 -0000 1.1
+++ delete_svc.html 8 Jun 2005 09:03:06 -0000 1.2
@@ -1,7 +1,6 @@
<HTML><HEAD><TITLE>MyAccount</TITLE></HEAD>
<BODY BGCOLOR="#eeeeee"><FONT SIZE=5>MyAccount</FONT><BR><BR>
<%= $url = "$selfurl?session=$session_id;action="; ''; %>
-<TABLE BORDER=0 CELLPADDING=4><TR>
<%= include('myaccount_menu') %>
<TD VALIGN="top">
--- NEW FILE: recharge_prepay.html ---
<HTML><HEAD><TITLE>MyAccount</TITLE></HEAD>
<BODY BGCOLOR="#eeeeee"><FONT SIZE=5>MyAccount</FONT><BR><BR>
<%= $url = "$selfurl?session=$session_id;action="; ''; %>
<%= include('myaccount_menu') %>
<TD VALIGN="top">
<FONT SIZE=4>Recharge with prepaid card</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="recharge_results">
<TABLE BGCOLOR="#cccccc">
<!--
<TR>
<TD ALIGN="right">Amount Due</TD>
<TD>
<TABLE><TR><TD BGCOLOR="#ffffff">
$<%=sprintf("%.2f",$balance)%>
</TD></TR></TABLE>
</TD>
</TR>
-->
<TR>
<TD ALIGN="right">Prepaid card number</TD>
<TD>
<INPUT TYPE="text" NAME="prepaid_cardnum" SIZE=20 MAXLENGTH=19 VALUE="<%=$prepaid_cardnum%>">
</TD>
</TR>
</TABLE>
<BR>
<INPUT TYPE="hidden" NAME="paybatch" VALUE="<%=$paybatch%>">
<INPUT TYPE="submit" NAME="process" VALUE="Recharge"> <!-- onClick="this.disabled=true"> -->
</FORM>
</TD></TR></TABLE>
<HR>
<FONT SIZE="-2">powered by <a href="http://www.sisd.com/freeside">freeside</a></FONT>
</BODY></HTML>
--- NEW FILE: recharge_results.html ---
<HTML><HEAD><TITLE>MyAccount</TITLE></HEAD>
<BODY BGCOLOR="#eeeeee"><FONT SIZE=5>MyAccount</FONT><BR><BR>
<%= $url = "$selfurl?session=$session_id;action="; ''; %>
<%= include('myaccount_menu') %>
<TD VALIGN="top">
<FONT SIZE=4>Recharge results</FONT><BR><BR>
<%= if ( $error ) {
$OUT .= qq!<FONT SIZE="+1" COLOR="#ff0000">Error processing your prepaid card: $error</FONT>!;
} else {
$OUT .= 'Prepaid card recharge sucessful!<BR><BR>';
$OUT .= '$'. sprintf('%.2f', $amount). ' added to your account.<BR><BR>'
if $amount;
$OUT .= $duration. ' added to your account.<BR><BR>'
if $seconds;
$OUT .= 'Thank you.';
} %>
</TD></TR></TABLE>
<HR>
<FONT SIZE="-2">powered by <a href="http://www.sisd.com/freeside">freeside</a></FONT>
</BODY></HTML>
Index: myaccount_menu.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/fs_selfservice/FS-SelfService/cgi/myaccount_menu.html,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- myaccount_menu.html 15 Jul 2004 22:40:00 -0000 1.1
+++ myaccount_menu.html 8 Jun 2005 09:03:06 -0000 1.2
@@ -1,13 +1,89 @@
<%= $url = "$selfurl?session=$session_id;action="; ''; %>
+<TABLE BORDER=0><TR>
<TD VALIGN="top" HEIGHT=384 BGCOLOR="#dddddd">
-<A HREF="<%= $url %>myaccount">Overview</A><BR><BR>
-<!--A HREF="<%= $url %>change_bill"-->Change payment info</A> *<BR><BR>
-<!--A HREF="<%= $url %>change_ship"-->Change service address</A> *<BR><BR>
-<A HREF="<%= $url %>provision">Setup my services</A><BR><BR>
-<!--A HREF="<%= $url %>order"-->Purchase additional package</A> *<BR><BR>
-<!--<A HREF="<%= $url %>pw_list">Change password(s)</A> *<BR><BR>-->
-<A HREF="passwd.html">Change password(s)</A><BR><BR>
-<A HREF="<%= $url %>logout">Logout</A><BR><BR>
+<TABLE CELLSPACING=0 BORDER=0>
+
+<%=
+
+my @menu = (
+{ title=>' ' },
+{ title=>'Overview', url=>'myaccount', size=>'+1', },
+{ title=>' ' },
+
+{ title=>'Purchase', size=>'+1', },
+ { title=>'Purchase additional package*', url=>'order', 'indent'=>2 },
+);
+
+if ( 1 ) { #XXXFIXME "enable selfservice prepay features" flag or something, eventually per-pkg or something really fancy
+
+ push @menu, (
+ { title=>'Recharge my account with a credit card',
+ url=>'make_payment', indent=>2 },
+ { title=>'Recharge my account with a prepaid card',
+ url=>'recharge_prepay', indent=>2 },
+ );
+
+}
+
+push @menu, (
+
+{ title=>' ' },
+
+{ title=>'Setup my services', url=>'provision', size=>'+1', },
+
+{ title=>' ' },
+
+{ title=>'Change my information', size=>'+1', },
+ { title=>'Change payment information*', url=>'change_bill', indent=>2 },
+ { title=>'Change service address*', url=>'change_ship', indent=>2 },
+ { title=>'Change password(s)*', url=>'hmmmFIXME', indent=>2 },
+
+{ title=>' ' },
+
+{ title=>'Logout', url=>'logout', size=>'+1', },
+
+);
+
+foreach my $item ( @menu ) {
+
+ $OUT .= '<TR><TD';
+ if ( exists $item->{'url'} && $action eq $item->{'url'} ) {
+ $OUT .= ' BGCOLOR="#eeeeee" '.
+ ' STYLE="border-top: 1px solid black;'.
+ ' border-left: 1px solid black;'.
+ ' border-bottom: 1px solid black"';
+ } else {
+ $OUT .= ' STYLE="border-right: 1px solid black"';
+ }
+ $OUT.='>';
+
+ $OUT .= '<FONT SIZE="'. $item->{'size'}. '">'
+ if exists $item->{'size'};
+
+ $OUT .= ' ' x $item->{'indent'}
+ if exists $item->{'indent'};
+
+ $OUT .= '<A HREF="'. $url. $item->{'url'}. '">'
+ if exists $item->{'url'} && $action ne $item->{'url'};
+
+ $item->{'title'} =~ s/ / /g;
+ $OUT .= $item->{'title'};
+
+ $OUT .= '</FONT>'
+ if exists $item->{'size'};
+
+ $OUT .= '</A>'
+ if exists $item->{'url'} && $action ne $item->{'url'};
+
+ $OUT .= '</TD></TR>';
+
+}
+
+%>
+
+</TABLE>
+
+<A HREF="passwd.html">(tempFIXME) Change password(s)</A><BR><BR>
* coming soon
</TD>
Index: agent_delete_svc.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/fs_selfservice/FS-SelfService/cgi/agent_delete_svc.html,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- agent_delete_svc.html 24 Aug 2004 11:16:56 -0000 1.1
+++ agent_delete_svc.html 8 Jun 2005 09:03:06 -0000 1.2
@@ -1,7 +1,6 @@
<HTML><HEAD><TITLE>MyAccount</TITLE></HEAD>
<BODY BGCOLOR="#eeeeee"><FONT SIZE=5>MyAccount</FONT><BR><BR>
<%= $url = "$selfurl?session=$session_id;action="; ''; %>
-<TABLE BORDER=0 CELLPADDING=4><TR>
<%= include('myaccount_menu') %>
<TD VALIGN="top">
<%= $small_custview %>
Index: provision_svc_acct.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/fs_selfservice/FS-SelfService/cgi/provision_svc_acct.html,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- provision_svc_acct.html 17 Oct 2004 09:54:58 -0000 1.2
+++ provision_svc_acct.html 8 Jun 2005 09:03:06 -0000 1.3
@@ -1,7 +1,6 @@
<HTML><HEAD><TITLE>MyAccount</TITLE></HEAD>
<BODY BGCOLOR="#eeeeee"><FONT SIZE=5>MyAccount</FONT><BR><BR>
<%= $url = "$selfurl?session=$session_id;action="; ''; %>
-<TABLE BORDER=0 CELLPADDING=4><TR>
<%= include('myaccount_menu') %>
<TD VALIGN="top">
<%= include('svc_acct') %>
Index: provision.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/fs_selfservice/FS-SelfService/cgi/provision.html,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- provision.html 24 Aug 2004 11:16:56 -0000 1.2
+++ provision.html 8 Jun 2005 09:03:06 -0000 1.3
@@ -1,7 +1,6 @@
<HTML><HEAD><TITLE>MyAccount</TITLE></HEAD>
<BODY BGCOLOR="#eeeeee"><FONT SIZE=5>MyAccount</FONT><BR><BR>
<%= $url = "$selfurl?session=$session_id;action="; ''; %>
-<TABLE BORDER=0 CELLPADDING=4><TR>
<%= include('myaccount_menu') %>
<TD VALIGN="top">
<%= include('provision_list') %>
Index: myaccount.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/fs_selfservice/FS-SelfService/cgi/myaccount.html,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- myaccount.html 15 Jul 2004 22:40:00 -0000 1.5
+++ myaccount.html 8 Jun 2005 09:03:06 -0000 1.6
@@ -1,7 +1,6 @@
<HTML><HEAD><TITLE>MyAccount</TITLE></HEAD>
<BODY BGCOLOR="#eeeeee"><FONT SIZE=5>MyAccount</FONT><BR><BR>
<%= $url = "$selfurl?session=$session_id;action="; ''; %>
-<TABLE BORDER=0 CELLPADDING=4><TR>
<%= include('myaccount_menu') %>
<TD VALIGN="top">
Index: view_invoice.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/fs_selfservice/FS-SelfService/cgi/view_invoice.html,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- view_invoice.html 15 Jul 2004 22:40:00 -0000 1.3
+++ view_invoice.html 8 Jun 2005 09:03:06 -0000 1.4
@@ -1,7 +1,6 @@
<HTML><HEAD><TITLE>MyAccount</TITLE></HEAD>
<BODY BGCOLOR="#eeeeee"><FONT SIZE=5>MyAccount</FONT><BR><BR>
<%= $url = "$selfurl?session=$session_id;action="; ''; %>
-<TABLE BORDER=0 CELLPADDING=4><TR>
<%= include('myaccount_menu') %>
<TD VALIGN="top">
More information about the freeside-commits
mailing list