| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- <?php
- /**
- * 重庆赤晓店信息科技有限公司
- * https://www.chixiaodian.com
- * Copyright (c) 2023 赤店商城 All rights reserved.
- */
- namespace app\modules\alliance\controllers;
- use app\models\Option;
- use app\modules\alliance\controllers\BaseController;
- use app\modules\alliance\models\NewMerchantForm;
- use Overtrue\Socialite\SocialiteManager;
- use yii\helpers\Json;
- class NewMerchantController extends BaseController
- {
- //TODO 当面付逻辑 start
- public function actionFacePayConfig()
- {
- $form = new NewMerchantForm();
- $form->type = post_params('type', 'weixin');
- $form->qrcode_id = post_params('qrcode_id');
- $form->id = post_params('mini_id');
- $form->store_id = post_params('store_id');
- $res = $form->facePayConfig();
- return $this->asJson($res);
- }
- public function actionFacePay()
- {
- $form = new NewMerchantForm();
- $form->type = post_params('type', 'weixin');
- $form->code = post_params("code");
- $form->qrcode_id = post_params("qrcode_id");
- $form->id = post_params("mini_id", 0);
- $form->pay_fee = post_params("pay_fee");
- $form->_from = post_params("_from");
- $form->send_price = post_params("send_price");
- $form->take_price = post_params("take_price");
- $form->is_use_yunst = intval(post_params("is_use_yunst"));
- $res = $form->facePay();
- return $this->asJson($res);
- }
- //查询是否支付成功
- public function actionPayResult()
- {
- $form = new NewMerchantForm();
- $form->order_no = post_params("order_no");
- $res = $form->payResult();
- return $this->asJson($res);
- }
- //赠送积分
- public function actionGetGiveIntegral()
- {
- $form = new NewMerchantForm();
- $form->pay_fee = get_params("pay_fee");
- $res = $form->getGiveIntegral();
- return $this->asJson($res);
- }
- }
|