Skip to content

Commit

Permalink
saveOrder now populate the lastErrorMessage when the order was not up…
Browse files Browse the repository at this point in the history
…dated because of outdated versionNumber/changeCounter.
  • Loading branch information
freerk-mpluskassa committed Sep 24, 2019
1 parent c5a76fb commit 1bed415
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions Mplusqapiclient.php
Original file line number Diff line number Diff line change
Expand Up @@ -5220,12 +5220,13 @@ public function parseSaveOrderResult($soapSaveOrderResult)
return true;
} else if (isset($soapSaveOrderResult->result) and $soapSaveOrderResult->result == 'SAVE-ORDER-RESULT-NO-CHANGES') {
return true;
} else {
if ( ! empty($soapSaveOrderResult->errorMessage)) {
$this->lastErrorMessage = $soapSaveOrderResult->errorMessage;
}
return false;
} else if (isset($soapSaveOrderResult->result) and $soapSaveOrderResult->result == 'SAVE-ORDER-RESULT-ORDER-HAS-CHANGED') {
$this->lastErrorMessage = 'Order has changed. Please send up-to-date version versionNumber and changeCounter.';
}
if (!empty($soapSaveOrderResult->errorMessage)) {
$this->lastErrorMessage = $soapSaveOrderResult->errorMessage;
}
return false;
} // END parseSaveOrderResult()

//----------------------------------------------------------------------------
Expand Down

0 comments on commit 1bed415

Please sign in to comment.