| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- <?php
- /**
- * 重庆赤晓店信息科技有限公司
- * https://www.chixiaodian.com
- * Copyright (c) 2023 赤店商城 All rights reserved.
- */
- namespace app\modules\admin\controllers;
- use app\utils\Allinpay\Allinpay;
- use app\models\Order;
- use app\utils\OrderNo;
- class AllinpayController extends BaseController {
- public function actionTest() {
- $store_id = get_store_id();
- $id = input_params('id');
- $order = Order::findOne($id);
- return $this->asJson($conf);
- }
- public function actionConf() {
- $store_id = get_store_id();
- $conf = Allinpay::conf($store_id);
- return $this->asJson([
- 'code' => 0,
- 'msg' => 'ok',
- 'data' => $conf,
- ]);
- }
- public function actionConfSave() {
- $store_id = get_store_id();
- $conf = input_params('conf');
- if (!is_array($conf)) {
- $conf = json_decode($conf, true);
- }
- Allinpay::saveConf($store_id, $conf);
- return $this->asJson([
- 'code' => 0,
- 'msg' => '保存成功'
- ]);
- }
- }
|