X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2FAPI.pm;h=cc5f6092ab88824d93dbdb19149f60d7eb9d81a7;hb=98912ac0e8ca237cb9ce5a969f026a099b2954ea;hp=994f8ba702bbee4ae54bc16c9395791d3ae474c6;hpb=8b307b13a808f9174f781e6300b08a95bdca5dfa;p=freeside.git diff --git a/FS/FS/API.pm b/FS/FS/API.pm index 994f8ba70..cc5f6092a 100644 --- a/FS/FS/API.pm +++ b/FS/FS/API.pm @@ -593,6 +593,8 @@ sub update_customer { my( $class, %opt ) = @_; my $conf = new FS::Conf; + return { 'error' => 'Incorrect shared secret' } + unless $opt{secret} eq $conf->config('api_shared_secret'); my $custnum = $opt{'custnum'} @@ -749,8 +751,21 @@ sub location_info { Bills a single customer now, in the same fashion as the "Bill now" link in the UI. -Returns a hash reference with a single key, 'error'. If there is an error, -the value contains the error, otherwise it is empty. +Returns a hash reference with a single key, 'error'. If there is an error, +the value contains the error, otherwise it is empty. Takes a list of keys and +values as parameters with the following keys: + +=over 4 + +=item secret + +API Secret (required) + +=item custnum + +Customer number (required) + +=back =cut