projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
batch refactor continued
[freeside.git]
/
FS
/
FS
/
ClientAPI
/
Signup.pm
diff --git
a/FS/FS/ClientAPI/Signup.pm
b/FS/FS/ClientAPI/Signup.pm
index
0089e30
..
765ce40
100644
(file)
--- a/
FS/FS/ClientAPI/Signup.pm
+++ b/
FS/FS/ClientAPI/Signup.pm
@@
-5,6
+5,7
@@
use Tie::RefHash;
use FS::Conf;
use FS::Record qw(qsearch qsearchs dbdef);
use FS::Msgcat qw(gettext);
use FS::Conf;
use FS::Record qw(qsearch qsearchs dbdef);
use FS::Msgcat qw(gettext);
+use FS::ClientAPI_SessionCache;
use FS::agent;
use FS::cust_main_county;
use FS::part_pkg;
use FS::agent;
use FS::cust_main_county;
use FS::part_pkg;
@@
-16,12
+17,6
@@
use FS::acct_snarf;
use FS::queue;
use FS::reg_code;
use FS::queue;
use FS::reg_code;
-#use FS::ClientAPI; #hmm
-FS::ClientAPI->register_handlers(
- 'Signup/signup_info' => \&signup_info,
- 'Signup/new_customer' => \&new_customer,
-);
-
sub signup_info {
my $packet = shift;
sub signup_info {
my $packet = shift;
@@
-94,7
+89,7
@@
sub signup_info {
my $session = '';
if ( exists $packet->{'session_id'} ) {
my $session = '';
if ( exists $packet->{'session_id'} ) {
- my $cache = new
Cache::SharedMemory
Cache( {
+ my $cache = new
FS::ClientAPI_Session
Cache( {
'namespace' => 'FS::ClientAPI::Agent',
} );
$session = $cache->get($packet->{'session_id'});
'namespace' => 'FS::ClientAPI::Agent',
} );
$session = $cache->get($packet->{'session_id'});
@@
-170,7
+165,7
@@
sub new_customer {
my $agentnum;
if ( exists $packet->{'session_id'} ) {
my $agentnum;
if ( exists $packet->{'session_id'} ) {
- my $cache = new
Cache::SharedMemory
Cache( {
+ my $cache = new
FS::ClientAPI_Session
Cache( {
'namespace' => 'FS::ClientAPI::Agent',
} );
my $session = $cache->get($packet->{'session_id'});
'namespace' => 'FS::ClientAPI::Agent',
} );
my $session = $cache->get($packet->{'session_id'});
@@
-202,7
+197,12
@@
sub new_customer {
ship_city ship_county ship_state ship_zip ship_country
ship_daytime ship_night ship_fax
ship_city ship_county ship_state ship_zip ship_country
ship_daytime ship_night ship_fax
- payby payinfo paycvv paydate payname referral_custnum comments
+ payby
+ payinfo paycvv paydate payname
+ paystart_month paystart_year payissue
+ payip
+
+ referral_custnum comments
)
} );
)
} );
@@
-302,7
+302,7
@@
sub new_customer {
$cust_main->apply_payments;
$cust_main->apply_credits;
$cust_main->apply_payments;
$cust_main->apply_credits;
- $bill_error = $cust_main->collect;
+ $bill_error = $cust_main->collect
('realtime' => 1)
;
#warn "[fs_signup_server] error collecting from new customer: $bill_error"
# if $bill_error;
#warn "[fs_signup_server] error collecting from new customer: $bill_error"
# if $bill_error;