freeside/fs_selfservice/FS-SelfService/cgi process_svc_external.html,NONE,1.1 provision_list.html,1.1,1.2 agent.cgi,1.6,1.7 selfservice.cgi,1.9,1.10
ivan
ivan at pouncequick.420.am
Sun Oct 17 07:01:54 PDT 2004
Update of /home/cvs/cvsroot/freeside/fs_selfservice/FS-SelfService/cgi
In directory pouncequick:/tmp/cvs-serv30067/fs_selfservice/FS-SelfService/cgi
Modified Files:
provision_list.html agent.cgi selfservice.cgi
Added Files:
process_svc_external.html
Log Message:
add artera turbo handling to self-service and reseller interfaces
Index: agent.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/fs_selfservice/FS-SelfService/cgi/agent.cgi,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- agent.cgi 24 Aug 2004 11:16:56 -0000 1.6
+++ agent.cgi 17 Oct 2004 14:01:47 -0000 1.7
@@ -14,7 +14,8 @@
agent_list_customers
signup_info new_customer
customer_info list_pkgs order_pkg
- part_svc_info provision_acct unprovision_svc
+ part_svc_info provision_acct provision_external
+ unprovision_svc
);
$DEBUG = 0;
@@ -67,7 +68,7 @@
warn "$me checking action\n" if $DEBUG;
$cgi->param('action') =~
- /^(agent_main|signup|process_signup|list_customers|view_customer|agent_provision|provision_svc|process_svc_acct|delete_svc|agent_order_pkg|process_order_pkg|logout)$/
+ /^(agent_main|signup|process_signup|list_customers|view_customer|agent_provision|provision_svc|process_svc_acct|process_svc_external|delete_svc|agent_order_pkg|process_order_pkg|logout)$/
or die "unknown action ". $cgi->param('action');
my $action = $1;
@@ -318,6 +319,26 @@
'message' => $result->{'svc'}. ' setup sucessfully.',
};
}
+
+}
+
+sub process_svc_external {
+
+ my $result = provision_external (
+ 'agent_session_id' => $session_id,
+ map { $_ => $cgi->param($_) } qw( custnum pkgnum svcpart )
+ );
+
+ #warn "$result $result->{'error'}";
+ $action = 'agent_provision';
+ return {
+ %{agent_provision()},
+ 'message' => $result->{'error'}
+ ? '<FONT COLOR="#FF0000">'. $result->{'error'}. '</FONT>'
+ : $result->{'svc'}. ' setup sucessfully'.
+ ': serial number '.
+ sprintf('%010d', $result->{'id'}). '-'. $result->{'title'}
+ };
}
Index: provision_list.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/fs_selfservice/FS-SelfService/cgi/provision_list.html,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- provision_list.html 24 Aug 2004 11:16:56 -0000 1.1
+++ provision_list.html 17 Oct 2004 14:01:47 -0000 1.2
@@ -58,9 +58,22 @@
my $td = qq!<TD BGCOLOR="#$col"!;
+ my $link;
+
+ if ( $part_svc->{'svcdb'} eq 'svc_external'
+ #&& $conf->exists('svc_external-skip_manual')
+ ) {
+ $link = "${url}process_svc_external;".
+ "pkgnum=$pkg->{'pkgnum'};".
+ "svcpart=$part_svc->{'svcpart'}";
+ } else {
+ $link = "${url}provision_svc;".
+ "pkgnum=$pkg->{'pkgnum'};".
+ "svcpart=$part_svc->{'svcpart'}";
+ }
+
$OUT .= "<TR>$td COLSPAN=3 ALIGN=center>".
- qq!<A HREF="${url}provision_svc;pkgnum=$pkg->{'pkgnum'};svcpart=$part_svc->{'svcpart'}">!.
- 'Setup '. $part_svc->{'svc'}. '</A> '.
+ qq!<A HREF="$link">!. 'Setup '. $part_svc->{'svc'}. '</A> '.
'('. $part_svc->{'num_avail'}. ' available)'.
'</TD></TR>';
$col = $col eq $col1 ? $col2 : $col1;
--- NEW FILE: process_svc_external.html ---
<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">
<FONT SIZE=4><%= $svc %> setup sucessfully.</FONT>
<BR><BR>Your serial number is <%= sprintf("%010d-$title", $id) %>
</TD></TR></TABLE>
<HR>
<FONT SIZE="-2">powered by <a href="http://www.sisd.com/freeside">freeside</a></FONT>
</BODY></HTML>
Index: selfservice.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/fs_selfservice/FS-SelfService/cgi/selfservice.cgi,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- selfservice.cgi 24 Aug 2004 11:16:56 -0000 1.9
+++ selfservice.cgi 17 Oct 2004 14:01:47 -0000 1.10
@@ -10,7 +10,8 @@
use FS::SelfService qw( login customer_info invoice
payment_info process_payment
list_pkgs
- part_svc_info provision_acct unprovision_svc
+ part_svc_info provision_acct provision_external
+ unprovision_svc
);
$template_dir = '.';
@@ -60,7 +61,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|delete_svc)$/
+ /^(myaccount|view_invoice|make_payment|payment_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;
@@ -222,6 +223,13 @@
return $result;
}
+}
+
+sub process_svc_external {
+ provision_external (
+ 'session_id' => $session_id,
+ map { $_ => $cgi->param($_) } qw( pkgnum svcpart )
+ );
}
sub delete_svc {
More information about the freeside-commits
mailing list