changed Rimoapi::addRemark() to take api key parameter
This commit is contained in:
@@ -1420,8 +1420,14 @@ class PreorderController extends mfBaseController {
|
|||||||
|
|
||||||
$new_remark = date("d.m.Y").": ".$new_remark;
|
$new_remark = date("d.m.Y").": ".$new_remark;
|
||||||
|
|
||||||
|
$api_creds = $preorder->getNetownerRimoApiCredentials();
|
||||||
|
$this->log->debug(__METHOD__.": Rimo Api Creds: ".print_r($api_creds, true));
|
||||||
|
if(!$api_creds) return false;
|
||||||
|
|
||||||
|
$apikey = $api_creds["prod"]["key"];
|
||||||
|
|
||||||
// upload remark to Rimo
|
// upload remark to Rimo
|
||||||
if(!Rimoapi::addRemark($workorder->rimo_id, $new_remark)) {
|
if(!Rimoapi::addRemark($apikey, $workorder->rimo_id, $new_remark)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -553,13 +553,13 @@ class Rimoapi {
|
|||||||
return $resp_data;
|
return $resp_data;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function addRemark($object_id, $text) {
|
public static function addRemark($apikey, $object_id, $text) {
|
||||||
if(!$object_id || !$text) return false;
|
if(!$object_id || !$text) return false;
|
||||||
|
|
||||||
$log = mfLoghandler::singleton();
|
$log = mfLoghandler::singleton();
|
||||||
|
|
||||||
$params = [];
|
$params = [];
|
||||||
$params['apiKey'] = RIMO_API_JSON_APIKEY;
|
$params['apiKey'] = $apikey;
|
||||||
$params['objectId'] = $object_id;
|
$params['objectId'] = $object_id;
|
||||||
$params['text'] = $text;
|
$params['text'] = $text;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user