---
tags: [vompay, controller]
module: VomPay
---

# [Controller]Controllers

## Connections
[[_VomPay]] · [[[Service]SupplierServices]] · [[[Service]InvoiceServices]] · [[[Service]MyFatoorahAPIServices]] · [[[Service]DashboardSettingsServices]] · [[[Routes]Routes]]

## Source
`Modules/VomPay/Http/Controllers/`

All controllers extend `TenantBaseController`.

⚠️ Several methods contain stub `dd()` calls or are empty — module appears partially implemented.

---

## VomPayController
Main entry point for the integration landing page and supplier form flow.

| Method | HTTP | Purpose |
|---|---|---|
| index | GET | Integration landing page — checks profile completeness + package eligibility |
| userInformation | GET | Shows supplier profile (banks, type, code) via MyFatoorahSupplierAPIService |
| clickOnIntegrationButton | GET | If status = COMPLETED_PROFILE → integration index; else → requirements screen |
| supplierForm | GET | Shows supplier registration form (individual / company / cooperative) with banks + locale |
| dashboard | GET | Redirects to dashboard view |
| settings | GET | Returns settings view (stub — VomPaySettingController@index preferred) |

---

## VomPaySupplierController
Handles supplier onboarding steps.

| Method | HTTP | Purpose |
|---|---|---|
| store | POST | Create supplier in MyFatoorah + set commissions + save to DB |
| upload | POST | Upload KYC document via `VomPaySupplierService.uploadDocument()` |
| activate | POST | Set status = COMPLETED_PROFILE, send activation emails |
| imageValidation | POST | Validate uploaded document file before submission |
| emailTracking | POST | Track supplier registration step via `VomPayEmailTrackerService` |
| index | GET | ⚠️ Stub (`dd()`) |
| create | GET | ⚠️ Stub (`dd()` with banks + payment methods) |
| update | PUT | ⚠️ Empty |
| destroy | DELETE | ⚠️ Empty |

---

## VomPaySettingController
| Method | HTTP | Purpose |
|---|---|---|
| index | GET | Settings form via `PreparingVomPaySettingsCreationService` |
| store | POST | Save settings via `VomPaySettingService`, redirect to `company.settings.index` |
| create / edit / show / update / destroy | — | ⚠️ Empty stubs |

---

## VomPayDashboardController
| Method | HTTP | Purpose |
|---|---|---|
| index | GET | Dashboard view — AJAX-aware; calls `VomPayDashboardService.execute()` |
| getVomPayInvoices | GET | DataTables AJAX endpoint — paginated `VomPayInvoice` list via repository |

---

## VomPayInvoiceController
⚠️ Almost entirely stubs — `index` returns `dd('ddd')`. Not production-ready.
