X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2FClientAPI%2FSignup.pm;h=60639b132fb5186753dd266a7dd9a4f61af33094;hp=92fc6361d0ec71d41cffd4217dae818ad1aaf5ae;hb=9ae101389f2fe652575c6ab314a5e95c2283b72e;hpb=42ea96aceed291c4cb92cf475cb715b6ad7832c3 diff --git a/FS/FS/ClientAPI/Signup.pm b/FS/FS/ClientAPI/Signup.pm index 92fc6361d..60639b132 100644 --- a/FS/FS/ClientAPI/Signup.pm +++ b/FS/FS/ClientAPI/Signup.pm @@ -10,6 +10,8 @@ use FS::part_pkg; use FS::svc_acct_pop; use FS::cust_main; use FS::cust_pkg; +use FS::svc_acct; +use FS::acct_snarf; use FS::Msgcat qw(gettext); use FS::ClientAPI; #hmm @@ -155,6 +157,20 @@ sub new_customer { qw( username _password sec_phrase popnum ), } ); + my @acct_snarf; + my $snarfnum = 1; + while ( length($packet->{"snarf_machine$snarfnum"}) ) { + my $acct_snarf = new FS::acct_snarf ( { + 'machine' => $packet->{"snarf_machine$snarfnum"}, + 'protocol' => $packet->{"snarf_protocol$snarfnum"}, + 'username' => $packet->{"snarf_username$snarfnum"}, + '_password' => $packet->{"snarf_password$snarfnum"}, + } ); + $snarfnum++; + push @acct_snarf, $acct_snarf; + } + $svc_acct->child_objects( \@acct_snarf ); + my $y = $svc_acct->setdefault; # arguably should be in new method return { 'error' => $y } if $y && !ref($y);