feat(payment): implement PaymentManager for handling payment logic and callbacks
- Refactor PaymentController to delegate payment processing to PaymentManager. - Add findByOrderIdForUpdate method in PaymentRepository for pessimistic locking. - Create PaymentLog entity and repository for auditing payment actions. - Implement startGatewayHandoff and processCallback methods in PaymentManager. - Introduce transaction handling and logging for payment verification. - Update payment flow to ensure idempotency and prevent race conditions. - Enhance security by logging sensitive actions without exposing credentials. - Update database schema with migration for payment_logs table. - Document changes in payment flow architecture.
This commit is contained in:
@@ -88,6 +88,10 @@ services:
|
||||
$appBaseUrl: '%env(APP_BASE_URL)%'
|
||||
$allowedFrontendHosts: '%env(ALLOWED_FRONTEND_HOSTS)%'
|
||||
|
||||
App\Payment\Service\PaymentManager:
|
||||
arguments:
|
||||
$appBaseUrl: '%env(APP_BASE_URL)%'
|
||||
|
||||
App\Sms\Provider\KavehNegarProvider:
|
||||
arguments:
|
||||
$apiKey: '%env(default::KAVENEGAR_API_KEY)%'
|
||||
|
||||
Reference in New Issue
Block a user