| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- <?php
- /**
- * 重庆赤晓店信息科技有限公司
- * https://www.chixiaodian.com
- * Copyright (c) 2023 赤店商城 All rights reserved.
- */
- namespace app\plugins\scanCodePay\models\form;
- use app\utils\Notice\NoticeAction;
- class OrderSubmitPreviewForm extends OrderForm
- {
- public function rules()
- {
- return parent::rules();
- }
- public function search()
- {
- if (!$this->validate())
- return [
- 'code' => 1,
- 'msg' => $this->getErrorSummary(false)[0],
- ];
- try{
- $mchList = $this->getMchListData();
- if(isset($mchList['code']) && $mchList['code'] == 1){
- return $mchList;
- }
- }catch(\Exception $e){
- return [
- 'code'=>1,
- 'line' => $e->getLine(),
- 'file' => $e->getFile(),
- 'msg' => $e->getMessage()
- ];
- }
- return [
- 'code' => 0,
- 'msg' => 'OOKK',
- 'data' => [
- 'pay_type_list' => $this->getPayTypeList(),
- 'address' => $this->address,
- 'mch_list' => $mchList,
- 'integral'=>$this->integral,
- 'goods_card_list' => $this->goodsCardList(),
- 'template_id' => NoticeAction::getSendTamplateId(['order_pay', 'order_submit', 'order_send'])
- ],
- ];
- }
- }
|