From a810ab6bed99facdc0a48fd8b4bfebaafe1535d4 Mon Sep 17 00:00:00 2001 From: jouls Date: Fri, 22 Mar 2024 09:07:08 +0800 Subject: [PATCH] added masking on back acc number --- vendor-payouts.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/vendor-payouts.php b/vendor-payouts.php index 40cd2fd..970d1a4 100644 --- a/vendor-payouts.php +++ b/vendor-payouts.php @@ -243,7 +243,7 @@ if ($_SESSION["userId"] <> "") { $vendorIdCheck = $val['vendor_details'][0]['vendor_id']; if ((empty($vendorIdCheck) == false) && ($vendorIdCheck == $vendorId) && ($val['status'] == "DEPOSITED")) { echo ""; - echo "" . $val['net_amount'] . ""; + echo "" . "₱ " . $val['net_amount'] . ""; if (empty($val['bank_information'][0]['bank_name']) == false) { echo "" . $val['bank_information'][0]['bank_name'] . ""; // echo "" . $val['bank_information'][0]['account_number'] . ""; @@ -251,8 +251,11 @@ if ($_SESSION["userId"] <> "") { echo 'N/A'; } if (empty($val['bank_information'][0]['bank_account_number']) == false) { - echo "" . $val['bank_information'][0]['bank_account_number'] . ""; - // echo "" . $val['bank_information'][0]['account_number'] . ""; + $accNum = $val['bank_information'][0]['bank_account_number']; + // Replace characters with asterisks for all characters except the last three segments + $maskedAccNum = substr_replace($accNum, str_repeat('*', strlen($accNum) - 3), 0, -3); + echo "" . $maskedAccNum . ""; + // echo "" . $val['bank_information'][0]['bank_account_number'] . ""; } else { echo 'N/A'; };