| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- <?php
- namespace addons\Store\common\logic\order\limit;
- use addons\Coupon\AddonConfig;
- use addons\Coupon\common\enums\AddonsCouponEnum;
- use addons\Coupon\common\models\AddonsCoupon;
- use addons\Coupon\common\models\AddonsCouponUserRelate;
- use addons\Store\common\enums\StoreEnum;
- use addons\Store\common\models\StoreCoupon;
- use addons\Store\common\models\StoreCouponUserRelate;
- use addons\Store\common\models\StoreExtra;
- use addons\Store\common\models\StoreGoodsCateRelate;
- use common\enums\AddonsEnum;
- use common\enums\StatusEnum;
- use common\globals\GlobalInvoke;
- use common\models\goods\GoodsCateRelate;
- use common\models\mall\MallAddons;
- use Exception;
- use yii\helpers\Json;
- use common\logic\order\marketing\BaseMarketing;
- /**
- * 下单检测
- * @Author bing
- * @DateTime 2022-12-2 19:07:32
- * @copyright: Copyright (c) 2020 广东七件事集团
- */
- class OrderCheck extends BaseMarketing
- {
- public function execute($form)
- {
- }
- public static function compute($form)
- {
- foreach ($form->group_order_goods as $item) {
- $store_id = $item['mch_order_info']['store_id'];
- $mall_id = $item['mch_order_info']['mall_id'];
- $order_check = GlobalInvoke::exec(GlobalInvoke::ORDERC_CHECK, $mall_id, ['mall_id' => $mall_id,'pay_money' => $item['mch_order_info']['total_pay_price'],'store_id' => $store_id]);
- if($order_check && $order_check['status'] === false){
- //下单检测失败
- $msg = $order_check['msg'] ?? '下单检测失败';
- throw new Exception($msg);
- }
- }
- }
- }
|