OrderPay.php 949 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. /**
  3. * Niushop商城系统 - 团队十年电商经验汇集巨献!
  4. * =========================================================
  5. * Copy right 2019-2029 上海牛之云网络科技有限公司, 保留所有权利。
  6. * ----------------------------------------------
  7. * 官方网址: https://www.niushop.com
  8. * =========================================================
  9. */
  10. namespace addon\pointexchange\event;
  11. use addon\pointexchange\model\Order;
  12. /**
  13. * 活动展示
  14. */
  15. class OrderPay
  16. {
  17. /**
  18. * 活动展示
  19. * @return multitype:number unknown
  20. */
  21. public function handle($param)
  22. {
  23. if ($param['promotion_type'] == 'pointexchange') {
  24. $order_model = new Order();
  25. $order_info_result = $order_model->getOrderInfo([ [ 'relate_order_id', '=', $param['order_id'] ] ]);
  26. if ($order_info_result['code'] < 0) {
  27. return $order_info_result;
  28. }
  29. $res = $order_model->orderPay($order_info_result['data']);
  30. return $res;
  31. }
  32. }
  33. }