ifnex/04_Laravel/app
Kazem Alghasi b9ede16613 refactor(core): harden production environment and fix discount logic
Implement critical security hardening and resolve a P0 bug in the
discount code consumption flow. This update transitions the system
from a development-heavy configuration to a production-ready state.

Key changes:
- Fix P0 bug where `consumeDiscountCode()` was missing, breaking order
  registration; replaced with a robust `DiscountCodeService` using
  `discount_code_usages` for audit trails and idempotency.
- Implement strict production guards for the Zarinpal payment gateway
  to prevent accidental mock processing in live environments.
- Refactor WordPress bridge asset management to use `filemtime` based
  versioning instead of `time()` to prevent unnecessary cache busting.
- Remove debug-only hacks (`opcache_reset`, `header` cache control)
  from the WordPress plugin.
- Enhance file upload security by enforcing strict `mimetypes` validation.
- Update `.gitignore` to exclude sensitive WordPress configuration
  files and local PHPUnit caches.
- Add comprehensive documentation for production deployment, including
  security checklists and key rotation procedures.
- Update test suite to reflect new architecture and ensure 100%
  coverage of the discount service.
2026-10-31 19:18:58 +03:30
..
Console/Commands refactor(currency): simplify exchange rate logic to use Rial as base 2026-10-29 03:54:02 +03:30
Enums feat(invoices): thousand-separator formatting + fix total calc + integrate invoices into customer portal 2026-10-29 23:59:19 +03:30
Exceptions refactor(core): harden production environment and fix discount logic 2026-10-31 19:18:58 +03:30
Exports feat(shipment): implement status history tracking and rate import improvements 2026-08-24 03:40:13 +03:30
Filament feat(invoices): thousand-separator formatting + fix total calc + integrate invoices into customer portal 2026-10-29 23:59:19 +03:30
Helpers feat(ui): redesign admin dashboard with layered grid and custom branding 2026-10-03 11:08:50 +03:30
Http refactor(core): harden production environment and fix discount logic 2026-10-31 19:18:58 +03:30
Imports feat(ui): add invoice download action to shipment view 2026-08-23 23:35:12 +03:30
Models refactor(core): harden production environment and fix discount logic 2026-10-31 19:18:58 +03:30
Notifications feat(invoices): thousand-separator formatting + fix total calc + integrate invoices into customer portal 2026-10-29 23:59:19 +03:30
Observers feat(core): implement configuration-driven logic via SystemSetting 2026-09-10 02:25:21 +03:30
Policies feat(security): implement secure file storage and shipment access control 2026-10-01 03:34:28 +03:30
Providers fix(view): place rate-import blade in standard view path 2026-10-29 16:15:38 +03:30
Services refactor(core): harden production environment and fix discount logic 2026-10-31 19:18:58 +03:30
Traits feat(core): implement order approval flow, credit system, and import invoicing 2026-09-03 06:04:20 +03:30