Skip to content

Commit 2c2616b

Browse files
author
Mplus Software
committed
v1.1.3
registerTerminal now also fills in terminalSoftwareName and terminalSoftwareVersion
1 parent a11897d commit 2c2616b

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

Mplusqapiclient.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
class MplusQAPIclient
44
{
5-
const CLIENT_VERSION = '1.1.2';
5+
const CLIENT_VERSION = '1.1.3';
66

77
var $MIN_API_VERSION_MAJOR = 0;
88
var $MIN_API_VERSION_MINOR = 9;
@@ -3523,6 +3523,12 @@ public function convertTerminal($terminal)
35233523
if ( ! isset($terminal['uniqueDeviceIdentifier'])) {
35243524
$terminal['uniqueDeviceIdentifier'] = md5($_SERVER['REMOTE_ADDR']);
35253525
}
3526+
if ( ! array_key_exists('terminalSoftwareName', $terminal) or empty($terminal['terminalSoftwareName'])) {
3527+
$terminal['terminalSoftwareName'] = 'Mplus PHP API Client';
3528+
}
3529+
if ( ! array_key_exists('terminalSoftwareVersion', $terminal) or empty($terminal['terminalSoftwareVersion'])) {
3530+
$terminal['terminalSoftwareVersion'] = MplusQAPIclient::CLIENT_VERSION;
3531+
}
35263532
$object = arrayToObject(array('terminal'=>$terminal));
35273533
return $object;
35283534
} // END convertTerminal()
@@ -4161,4 +4167,4 @@ function arrayToObject($d, $leave_as_array=null, $debug=false) {
41614167
} // END arrayToObject()
41624168
}
41634169

4164-
//------------------------------------------------------------------------------
4170+
//------------------------------------------------------------------------------

0 commit comments

Comments
 (0)