summaryrefslogtreecommitdiff
path: root/FS/FS
diff options
context:
space:
mode:
authorivan <ivan>2008-07-21 22:34:35 +0000
committerivan <ivan>2008-07-21 22:34:35 +0000
commit533c1a26db76bcd486e36099da3976d7853ea46d (patch)
treed894261c443a9d8b178880d134b6665537fac9aa /FS/FS
parent4011d4876104367056d340f68697ff1a39ff810b (diff)
svc_phone signup
Diffstat (limited to 'FS/FS')
-rw-r--r--FS/FS/ClientAPI/Signup.pm20
1 files changed, 16 insertions, 4 deletions
diff --git a/FS/FS/ClientAPI/Signup.pm b/FS/FS/ClientAPI/Signup.pm
index aeb0aaac9..b8ed96a57 100644
--- a/FS/FS/ClientAPI/Signup.pm
+++ b/FS/FS/ClientAPI/Signup.pm
@@ -421,7 +421,7 @@ sub new_customer {
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 @@ sub new_customer {
} 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 @@ sub new_customer {
$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;
}