OrderPay.php 763 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * Author: 芸众商城 www.yunzshop.com
  5. * Date: 2017/2/28
  6. * Time: 上午10:35
  7. * comment:订单支付类
  8. */
  9. namespace app\frontend\modules\order\services\behavior;
  10. use app\common\events\order\AfterOrderPaidImmediatelyEvent;
  11. use app\common\models\Order;
  12. use app\Jobs\OrderPaidEventQueueJob;
  13. use Illuminate\Foundation\Bus\DispatchesJobs;
  14. class OrderPay extends ChangeStatusOperation
  15. {
  16. use DispatchesJobs;
  17. protected $statusBeforeChange = [ORDER::WAIT_PAY];
  18. protected $statusAfterChanged = ORDER::WAIT_SEND;
  19. protected $name = '支付';
  20. protected $time_field = 'pay_time';
  21. protected $past_tense_class_name = 'OrderPaid';
  22. protected function _fireEvent()
  23. {
  24. $this->firePaidEvent();
  25. }
  26. }