diff options
author | Ivan Kohler <ivan@freeside.biz> | 2016-03-26 13:18:41 -0700 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2016-03-26 13:18:41 -0700 |
commit | b7fcb9f53c2f6170d1f403e38a9ee9f1fa6f723a (patch) | |
tree | 54d8ab788b480a765d69048c815f4cc785bc1015 /FS/FS/ClientAPI | |
parent | e1df3e5503eb0050b5c68fbd574f78a2f8ca62ff (diff) |
webservice infrastructure, RT#33849
Diffstat (limited to 'FS/FS/ClientAPI')
-rw-r--r-- | FS/FS/ClientAPI/Freeside.pm | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/FS/FS/ClientAPI/Freeside.pm b/FS/FS/ClientAPI/Freeside.pm index 4e25f02..90fa550 100644 --- a/FS/FS/ClientAPI/Freeside.pm +++ b/FS/FS/ClientAPI/Freeside.pm @@ -30,12 +30,12 @@ sub freesideinc_service { my($username, $_password) = ($1,$2); my $svc_external = qsearchs({ - 'table' => 'svc_external', + 'table' => 'svc_acct', 'addl_from' => 'LEFT JOIN cust_svc USING ( svcnum )', 'hashref' => { 'username' => $username, '_password' => $_password, }, - 'extra_sql' => " AND svcpart = $svcpart", + 'extra_sql' => "AND svcpart = $svcpart", }) or return { 'error' => 'bad support-key' }; @@ -43,8 +43,9 @@ sub freesideinc_service { # but for now, everybody can use everything #record it happened + my $custnum = $svc_external->cust_svc->cust_pkg->custnum; my $webservice_log = new FS::webservice_log { - 'custnum' => $svc_external->cust_svc->cust_pkg->custnum, + 'custnum' => $custnum, 'svcnum' => $svc_external->svcnum, 'method' => $packet->{'method'}, 'quantity' => $packet->{'quantity'} || 1, @@ -52,8 +53,9 @@ sub freesideinc_service { my $error = $webservice_log->insert; return { 'error' => $error } if $error; - return { 'error' => '' }; - + return { 'error' => '', + 'custnum' => $custnum, + }; } 1; |