[freeside-commits] freeside/FS/FS/ClientAPI Signup.pm,1.45,1.46
Ivan,,,
ivan at wavetail.420.am
Mon Jul 21 15:34:37 PDT 2008
Update of /home/cvs/cvsroot/freeside/FS/FS/ClientAPI
In directory wavetail.420.am:/tmp/cvs-serv31392/FS/FS/ClientAPI
Modified Files:
Signup.pm
Log Message:
svc_phone signup
Index: Signup.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/ClientAPI/Signup.pm,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -d -r1.45 -r1.46
--- Signup.pm 21 Jul 2008 19:09:35 -0000 1.45
+++ Signup.pm 21 Jul 2008 22:34:34 -0000 1.46
@@ -421,7 +421,7 @@
my $svc;
if ( $svc_x eq 'svc_acct' ) {
- my $svc = new FS::svc_acct ( {
+ $svc = new FS::svc_acct ( {
'svcpart' => $svcpart,
map { $_ => $packet->{$_} }
qw( username _password sec_phrase popnum ),
@@ -444,10 +444,10 @@
} elsif ( $svc_x eq 'svc_phone' ) {
- my $svc = new FS::svc_phone ( {
+ $svc = new FS::svc_phone ( {
'svcpart' => $svcpart,
map { $_ => $packet->{$_} }
- qw( countrycode phonenum pin ),
+ qw( countrycode phonenum sip_password pin ),
} );
} else {
@@ -533,7 +533,19 @@
$error = $placeholder->delete;
return { 'error' => $error } if $error;
- return { error => '' };
+ my %return = ( 'error' => '',
+ 'signup_service' => $svc_x,
+ );
+
+ if ( $svc_x eq 'svc_acct' ) {
+ $return{$_} = $svc->$_() for qw( username _password );
+ } elsif ( $svc_x eq 'svc_phone' ) {
+ $return{$_} = $svc->$_() for qw( countrycode phonenum sip_password pin );
+ } else {
+ die "unknown signup service $svc_x";
+ }
+
+ return \%return;
}
More information about the freeside-commits
mailing list