Hi. Yes the new version of the standalone script works fine. My original script - which I use as an extention to the commercial script, (Mismatch.php), which used to work with the old version of the script is as follows:
<?php
require_once('../system/core/System.php');
System::loadSystemSettings ('../system/user-config/LocalSettings.php');
$dbhost = System::getSystemSettings('DBHOST');
$dbname = System::getSystemSettings('DBNAME');
$dbuser = System::getSystemSettings('DBUSER');
$dbpass = System::getSystemSettings('DBPASSWORD');
$con = mysql_connect($dbhost, $dbuser, $dbpass);
mysql_select_db($dbname, $con);
$result = mysql_query("SELECT * FROM mpesa_mismatch ORDER BY date");
if (!$result) {
die('Invalid query: ' . mysql_error());
}
echo '
<table align="center">
<tr bgcolor="#A6A6A6">
<td width="100"><b>Date</b></td><td width="100"><b>Payment_id</b></td><td width="100"><b>Amount</b></td><td width="100"><b>Action</b></td>
</tr>';
while ($row = mysql_fetch_array($result,MYSQL_ASSOC)) {
echo '
<tr bgcolor="#4F518E">
<td><font color="#FFFFFF">' . $row['date'] . '</font></td><td><font color="#FFFFFF">' . $row['pay_id'] . '</font></td><td><font color="#FFFFFF">' . $row['amount'] . '</font></td><td><a href="deletemis.php?id=' . $row['id_mis'] . '"><font color="#FFFFFF">Delete</font></a></td>';
}
echo '</table>';
mysql_close($con);
?>
I tried to replace line 5 - 8 with the following syntax but then got the error messages described in my first post
$dbhost = $this->appContext->getSystemSettings('DBHOST');
$dbname = $this->appContext->getSystemSettings('DBNAME');
$dbuser = $this->appContext->getSystemSettings('DBUSER');
$dbpass = $this->appContext->getSystemSettings('DBPASSWORD');