X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2FClientAPI%2FSGNG.pm;h=7f784dcd042e800eb04edb8bcf4ff020b07b9b9b;hb=d7eafc9c9aae2bf47ea19a56cc5bb1380c5874e4;hp=6f74e23a08e90d541654cfbd9b1c86b0e634be72;hpb=968936c184fd0ba1d00ce5939569e7e0bbcb6c24;p=freeside.git diff --git a/FS/FS/ClientAPI/SGNG.pm b/FS/FS/ClientAPI/SGNG.pm index 6f74e23a0..7f784dcd0 100644 --- a/FS/FS/ClientAPI/SGNG.pm +++ b/FS/FS/ClientAPI/SGNG.pm @@ -7,6 +7,7 @@ use vars qw( $cache $DEBUG ); use Time::Local qw(timelocal timelocal_nocheck); use Business::CreditCard; use FS::Record qw( qsearch qsearchs ); +use FS::Conf; use FS::cust_main; use FS::cust_pkg; use FS::ClientAPI::MyAccount; #qw( payment_info process_payment ) @@ -19,6 +20,13 @@ sub _cache { } ); } +sub ping { + #my $p = shift; + + return { 'pong' => '1' }; + +} + #this might almost be general-purpose sub decompify_pkgs { my $p = shift; @@ -158,6 +166,10 @@ sub _cust_main_payment_info { #find old cust_main records (with payments) sub _previous_cust_main { + + #safety check! return nothing unless we're enabled explicitly + return () unless FS::Conf->new->exists('sg-multicustomer_hack'); + my %opt = @_; my $custnum = $opt{'custnum'}; my $username = $opt{'username'}; @@ -225,6 +237,15 @@ sub previous_process_payment { } +sub previous_payment_info_renew_info { + my $p = shift; + my $renew_info = renew_info($p); + my $payment_info = previous_payment_info($p); + return { %$renew_info, + %$payment_info, + }; +} + sub previous_process_payment_order_pkg { my $p = shift;