You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

PaymentObserver.php 483B

123456789101112131415161718
  1. <?php
  2. namespace common\logic\User\UserProducer\Event;
  3. use common\logic\User\UserProducer\Module\UserProducerModule;
  4. use justcoded\yii2\eventlistener\observers\ActiveRecordObserver;
  5. use yii\db\AfterSaveEvent;
  6. class PaymentObserver extends ActiveRecordObserver
  7. {
  8. public function inserted(AfterSaveEvent $event)
  9. {
  10. $payment = $event->sender;
  11. $userProducerModule = UserProducerModule::getInstance();
  12. $userProducerModule->updateCredit($payment);
  13. }
  14. }