|
123456789101112131415161718 |
- <?php
-
- namespace common\logic\User\UserProducer\Event;
-
- use common\logic\User\UserProducer\Module\UserProducerModule;
- use justcoded\yii2\eventlistener\observers\ActiveRecordObserver;
- use yii\db\AfterSaveEvent;
-
- class PaymentObserver extends ActiveRecordObserver
- {
- public function inserted(AfterSaveEvent $event)
- {
- $payment = $event->sender;
- $userProducerModule = UserProducerModule::getInstance();
-
- $userProducerModule->updateCredit($payment);
- }
- }
|