12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- <?php
- /**
- * 支付方式
- * Created by PhpStorm.
- * User: XiaoMing
- * Date: 2019/12/4
- * Time: 15:17
- */
- namespace JinDouYun\Controller\System;
- use JinDouYun\Controller\BaseController;
- use Mall\Framework\Core\ErrorCode;
- use JinDouYun\Model\System\MEnterpriseBindPayment;
- class ApiPayment extends BaseController
- {
- private $objMEnterpriseBindPayment;
- /**
- * TemplateModule constructor.
- * @param bool $isCheckAcl
- * @param bool $isMustLogin
- */
- public function __construct($isCheckAcl = false, $isMustLogin = true)
- {
- parent::__construct($isCheckAcl, $isMustLogin);
- $this->objMEnterpriseBindPayment = new MEnterpriseBindPayment($this->onlineUserId, $this->onlineEnterpriseId);
- }
- /**
- * 获取企业配置的支付方式
- * @throws \Exception
- */
- public function getPaymentType()
- {
- $params = $this->request->getRawJson();
- $paramsData = [
- 'price' => isset($params['price']) ? $params['price'] : 0,//订单提交金额 银行打款的值
- ];
-
- $dbResult = $this->objMEnterpriseBindPayment->getPaymentType($paramsData);
- if ($dbResult->isSuccess()) {
- parent::sendOutput($dbResult->getData(), 0);
- }
- parent::sendOutput($dbResult->getData(), ErrorCode::$dberror);
- }
- }
|