1 package FS::SignupClient;
4 use vars qw($VERSION @ISA @EXPORT_OK); # $fs_signupd_socket);
9 #use Storable qw(nstore_fd fd_retrieve);
10 use FS::SelfService; # qw( new_customer signup_info );
14 @ISA = qw( Exporter );
15 @EXPORT_OK = qw( signup_info new_customer );
19 FS::SignupClient - Freeside signup client API
23 use FS::SignupClient qw( signup_info new_customer );
25 #this is the backwards-compatibility bit
26 ( $locales, $packages, $pops, $real_signup_info ) = signup_info;
28 #this is compatible with FS::SelfService::new_customer
29 $error = new_customer ( {
33 'comapny' => $company,
34 'address1' => $address1,
35 'address2' => $address2,
40 'country' => $country,
41 'daytime' => $daytime,
45 'payinfo' => $payinfo,
46 'paydate' => $paydate,
47 'payname' => $payname,
48 'invoicing_list' => $invoicing_list,
49 'referral_custnum' => $referral_custnum,
50 'comments' => $comments,
51 'pkgpart' => $pkgpart,
52 'username' => $username,
53 '_password' => $password,
54 'sec_phrase' => $sec_phrase,
56 'agentnum' => $agentnum, #optional
61 This module provides an API for a remote signup server.
63 It needs to be run as the freeside user. Because of this, the program which
64 calls these subroutines should be written very carefully.
72 Returns three array references of hash references.
74 The first set of hash references is of allowable locales. Each hash reference
75 has the following keys:
81 The second set of hash references is of allowable packages. Each hash
82 reference has the following keys:
86 The third set of hash references is of allowable POPs (Points Of Presence).
87 Each hash reference has the following keys:
94 (Future expansion: fourth argument is the $init_data hash reference)
101 my $init_data = FS::SelfService::signup_info();
103 (map { $init_data->{$_} } qw( cust_main_county part_pkg svc_acct_pop ) ),
108 =item new_customer HASHREF
110 Adds a customer to the remote Freeside system. Requires a hash reference as
111 a paramater with the following keys:
139 Returns a scalar error message, or the empty string for success.
145 my $hash = FS::SelfService::new_customer(@_);
155 L<fs_signupd>, L<FS::cust_main>