#echo "$sequence,$statusId,$txRefId,$seqstatus,$seqtxRefdId,$lasseq,$origBalance,$destBalance,$dateTime,$voucherPIN,$voucherSerial,$origMsisdn,$destMsisdn,$responseCode,$responseMessage"; $sequence = process_values($sequence); $statusId = process_values($statusId); $txRefId = process_values($txRefId); $seqstatus = process_values($seqstatus); $seqtxRefdId = process_values($seqtxRefdId); $lasseq = process_values($lasseq); $origBalance = process_values($origBalance); $destBalance = process_values($destBalance); $dateTime = process_values($dateTime); $voucherPIN = process_values($voucherPIN); $voucherSerial = process_values($voucherSerial); $origMsisdn = process_values($origMsisdn); $destMsisdn = process_values($destMsisdn); $responseCode = process_values($responseCode); $responseMessage = process_values($responseMessage); // log top up request response $retval = make_topup_request_mtn($origmsisdn, $destmsisdn, $sequenceid, $amount, $tarifftypeid, $serviceproviderid, $sdesc, $operator, $statusId, $txRefId, $seqstatus, $seqtxRefdId, $lasseq, $origBalance, $destBalance, $voucherPIN, $voucherSerial, $responseCode, $responseMessage); #print_r($retval); $responsed = array('statusId' => $statusId, 'responsecode' => $responseCode, 'responsemessage' => $responseMessage, 'sequencevalue' => $sequence, 'origmsisdn' => $origmsisdn, 'destmsisdn' => $destmsisdn, 'amount' => $amount, 'vourcherPIN' => $voucherPIN, 'vourcherSerial' => $voucherSerial, 'transactionrefid' => $txRefId); #print_r($responsed); #return $responsed; echo json_encode($responsed); /* /*$sequence = $value->sequence; $statusid = $value->statusId; $txrefid = $value->txRefId; $seqstatus = $value->seqstatus; $seqtxrefdid = $value->seqtxRefdId; $lasseq = $value->lasseq;
/* Auto fill values */ $len = count($data); if ($len < $nfields) { $data = array_pad($data, $nfields, ''); } elseif ($len > $nfields) { $data = array_slice($data, NULL, $nfields); } $values = array_combine($fields, $data); if (empty($values['name'])) { continue; } /* Check parent */ if (is_int($values['id_parent'])) { $id_parent = (int) get_db_value('id', 'tinventory', 'id', $values['id_parent']); } else { $id_parent = (int) get_db_value('id', 'tinventory', 'name', (string) $values['id_parent']); } $values['id_parent'] = $id_parent ? $id_parent : NULL; /* Check if the inventory item already exists */ $id_inventory = (int) get_db_value_filter('id', 'tinventory', array('name' => $values['name'], 'id_parent' => $values['id_parent'])); process_values($values, $id_inventory); if ($id_inventory) { process_sql_update('tinventory', $values, array('id' => $id_inventory)); echo 'Updated inventory "' . $values['name'] . '"'; } else { process_sql_insert('tinventory', $values); echo 'Inserted inventory "' . $values['name'] . '"'; } echo "\n"; } fclose($file);