$noOfUnapprovedTransactionsArray = $db->select("TRANSACTIONS", "userId = '$userId' AND isActive = 0"); // Balance check whether it can get executed or not if ($balance != "") { if ( bccomp($amount, $balance, FLOAT_PRECISION) == 1) { echo "Insufficient Fund"; return; } elseif (array_key_exists("id", $noOfUnapprovedTransactionsArray)) { echo "You have previous unapproved transactions. Please wait for previous transaction approval first and then try again"; return; } else { //Check TAN Validity if (AccountUtils::checkTANValidity($emailId, $tan)) { // If approval is not required, directly update the balance if ($isActive == 1) { //Update the balance $updatedBalanceAfterDeduction = 0; //Update the balance of the target user if the target user is already present in the same bank $updatedBalanceAfterAddition = 0; if ($balanceOfTheTargetUser != false) { // Check if the user is sending money to own account if ($iban == AccountUtils::getEmailFromIBAN ($emailId)) { echo "You can't tranfer money to your own account";
<?php require_once("../../classes/PluploadHandler.php"); require_once '../../includes/global.inc.php'; require_once '../../utils/Account.util.php'; require_once '../../utils/Generators.util.php'; $emailToUpdate = "*****@*****.**"; $tanNos = Generators::generateTANs ($emailToUpdate, 10); $tanEmailMessage = ""; for ($i=0; $i < count($tanNos); $i++) { $tanEmailMessage .= $i . ": " . $tanNos[$i] . "<br/>"; $tanEmailMessage .= "<br/><hr>"; } echo $tanEmailMessage; $tanToDecrypt = "dHDhS024hPzH/T8GxZiWFZoVDNVVJWCj/nfi7rBeNxBKQf904WD5zSEV4KppYKCzpC4mldvM9THJB2gwlw=="; echo "====>".AccountUtils::checkTANValidity($emailToUpdate, $tanToDecrypt);