From e978fbe6981e0d333ea878b4c19b4e410a1d5ea4 Mon Sep 17 00:00:00 2001 From: Dennis van den Heerik Date: Thu, 19 Mar 2020 11:46:01 +0100 Subject: [PATCH] added errorMessage to : -parseGetGiftcardResult -parseGetGiftcardHistoryResult --- Mplusqapiclient.php | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/Mplusqapiclient.php b/Mplusqapiclient.php index 5e60717..7bac35c 100755 --- a/Mplusqapiclient.php +++ b/Mplusqapiclient.php @@ -2,7 +2,7 @@ class MplusQAPIclient { - const CLIENT_VERSION = '1.28.2'; + const CLIENT_VERSION = '1.28.3'; const WSDL_TTL = 300; var $MIN_API_VERSION_MAJOR = 0; @@ -6325,9 +6325,11 @@ public function parseReloadGiftcardResult($soapReloadGiftcardResult) { public function parseGetGiftcardResult($soapGetGiftcardResult) { if (property_exists($soapGetGiftcardResult, "giftcard")) { return $soapGetGiftcardResult->giftcard; - } else { - return false; } + if (!empty($soapGetGiftcardResult->errorMessage)) { + $this->lastErrorMessage = $soapGetGiftcardResult->errorMessage; + } + return false; } // END parseGetGiftcardResult() @@ -6336,9 +6338,11 @@ public function parseGetGiftcardHistoryResult($soapGetGiftcardHistoryResult) { if (property_exists($soapGetGiftcardHistoryResult, "giftcardHistoryList") && property_exists($soapGetGiftcardHistoryResult->giftcardHistoryList, "giftcardHistory")) { return $soapGetGiftcardHistoryResult->giftcardHistoryList->giftcardHistory; - } else { - return false; } + if (!empty($soapGetGiftcardHistoryResult->errorMessage)) { + $this->lastErrorMessage = $soapGetGiftcardHistoryResult->errorMessage; + } + return false; } // END parseGetGiftcardHistoryResult()