|
2 | 2 |
|
3 | 3 | class MplusQAPIclient
|
4 | 4 | {
|
5 |
| - const CLIENT_VERSION = '1.29.2'; |
| 5 | + const CLIENT_VERSION = '1.30.0'; |
6 | 6 | const WSDL_TTL = 300;
|
7 | 7 |
|
8 | 8 | var $MIN_API_VERSION_MAJOR = 0;
|
@@ -1047,6 +1047,29 @@ public function getTableListV2($terminal, $attempts=0)
|
1047 | 1047 |
|
1048 | 1048 | //----------------------------------------------------------------------------
|
1049 | 1049 |
|
| 1050 | + public function getTableListV3($request, $attempts=0) |
| 1051 | + { |
| 1052 | + try { |
| 1053 | + $result = $this->client->getTableListV3($this->parser->convertGetTableListV3Request($request)); |
| 1054 | + if ($this->returnRawResult) { |
| 1055 | + return $result; |
| 1056 | + } |
| 1057 | + return $this->parser->parseTableListV3($result); |
| 1058 | + } catch (SoapFault $e) { |
| 1059 | + $msg = $e->getMessage(); |
| 1060 | + if (false !== stripos($msg, 'Could not connect to host') and $attempts < 3) { |
| 1061 | + sleep(1); |
| 1062 | + return $this->getTableListV3($request, $attempts+1); |
| 1063 | + } else { |
| 1064 | + throw new MplusQAPIException('SoapFault occurred: '.$msg, 0, $e); |
| 1065 | + } |
| 1066 | + } catch (Exception $e) { |
| 1067 | + throw new MplusQAPIException('Exception occurred: '.$e->getMessage(), 0, $e); |
| 1068 | + } |
| 1069 | + } |
| 1070 | + |
| 1071 | + //---------------------------------------------------------------------------- |
| 1072 | + |
1050 | 1073 | public function getCurrentTableOrders($request=null, $attempts=0)
|
1051 | 1074 | {
|
1052 | 1075 | try {
|
@@ -4521,6 +4544,13 @@ public function parseTableListV2($soapTableListV2)
|
4521 | 4544 |
|
4522 | 4545 | //----------------------------------------------------------------------------
|
4523 | 4546 |
|
| 4547 | + public function parseTableListV3($soapTableListV3) |
| 4548 | + { |
| 4549 | + return parseTableListV2($soapTableListV3); |
| 4550 | + } |
| 4551 | + |
| 4552 | + //---------------------------------------------------------------------------- |
| 4553 | + |
4524 | 4554 | public function parseAvailablePaymentMethods($soapAvailablePaymentMethods)
|
4525 | 4555 | {
|
4526 | 4556 | if (isset($soapAvailablePaymentMethods->paymentMethodList->paymentMethod)) {
|
@@ -8500,6 +8530,17 @@ public function convertTerminal($terminal)
|
8500 | 8530 |
|
8501 | 8531 | //----------------------------------------------------------------------------
|
8502 | 8532 |
|
| 8533 | + public function convertGetTableListV3Request($request) |
| 8534 | + { |
| 8535 | + if (is_null($request)) { |
| 8536 | + $request = []; |
| 8537 | + } |
| 8538 | + $object = arrayToObject(['request'=>$request]); |
| 8539 | + return $object; |
| 8540 | + } |
| 8541 | + |
| 8542 | + //---------------------------------------------------------------------------- |
| 8543 | + |
8503 | 8544 | public function convertGetCurrentTableOrdersRequest($request)
|
8504 | 8545 | {
|
8505 | 8546 | if (is_null($request)) {
|
|
0 commit comments