Grenke
Anbindung an die Grenke Leasing-API. Drei Geschäfts-Flows werden abgedeckt:
| Flow | Endpunkt-Sequenz |
|---|---|
| Standard | POST /requests → polling GET /requests/{id} bis ReadyToSign → GET .../e-signature/configuration → POST .../e-signature |
| Ausnahme | POST /requests → PUT .../cancel-e-signature → PUT .../switchToPaperContract |
| MissingInfo | POST /requests → polling, bis State MissingInfo → automatischer Mailflow an Lessee |
Die volle Logik ist in app/Services/Grenke/RequestFlowService orchestriert und kann mit einem einzigen Endpunkt (POST /api/v1/grenke/grenke/request-flow) durchlaufen werden — oder Schritt für Schritt mit den dedizierten Endpunkten.
Architektur-Stack
Inhalt
- ApiService — Low-Level HTTP-Client (X.509-Cert)
- Actions — atomare API-Operationen
- DTOs — typisierte Request/Response-Container
- Enums — RequestState (State-Machine), ProductType, PaymentMethod, …
- Controllers — RequestController, RequestFlowController, CalculateController
- Request-Flow — kompletter Lease-Workflow End-to-End
- MissingInfo-Mailflow — automatischer Mail-Versand bei Status
MissingInfo - Helper & Konfiguration —
Grenke\Helper,config/grenke.php, Env-Variablen
Authentication zu Grenke
Outbound-Auth zu Grenke erfolgt über X.509 SSL Client-Zertifikate (PEM + Passwort). Die Werte stehen in .env:
GRENKE_BASE_URL="https://demo-api.grenke.de/basic/v1/"
GRENKE_PEM_FILE="grenke.pem" # liegt in storage/app/private/cert/
GRENKE_CERT_PASS="..."
GRENKE_TIMEOUT=30
GRENKE_CONNECT_TIMEOUT=10
GRENKE_PAGE_SIZE=3501
# MissingInfo-Mailflow
GRENKE_MISSING_INFO_MAILFLOW_ENABLED=true
GRENKE_MISSING_INFO_WECLAPP_TEMPLATE_ID=12345
GRENKE_MISSING_INFO_CC=cc1@bluesafety.com,cc2@bluesafety.com
GRENKE_MISSING_INFO_BCC=
GRENKE_MISSING_INFO_DEDUPLICATE_HOURS=24
GRENKE_MISSING_INFO_STORE_RENDERED_VIEW=false
Das ApiService lädt die Werte automatisch aus config('services.grenke.*') und config('grenke.*').