FreezeAccount
exports['kartik-banking']:FreezeAccount(accountNumber, freeze)🔹 Description
Freezes or unfreezes a bank account by updating its status in the database to either "frozen" or "active".
This is useful for administrative actions such as fraud prevention or enforcing penalties.
🔧 Parameters
Name
Type
Required
Description
accountNumber
string
✅
The unique account number of the bank account to update.
freeze
boolean
✅
If true, freezes the account; if false, unfreezes it.
📤 Returns
Type
Description
true
If the account was successfully updated.
false
If no rows were updated.
🧠 Example Usage
-- Freeze the account
local success = exports['kartik-banking']:FreezeAccount("ACC-XYZ123", true)
if success then
print("Account has been frozen.")
else
print("Failed to freeze account.")
end
-- Unfreeze the account
local success = exports['kartik-banking']:FreezeAccount("ACC-XYZ123", false)
if success then
print("Account has been unfrozen.")
endLast updated