From 87a492b8345b4f1f5ded52f5e5397c301785d51c Mon Sep 17 00:00:00 2001 From: liu <1873441552@qq.com> Date: Mon, 24 Jun 2024 16:42:41 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B6=E9=93=B6=E5=8F=B0=E9=80=BB=E8=BE=91?= =?UTF-8?q?=E5=85=85=E5=80=BC=E6=96=B9=E5=BC=8F=E5=8C=BA=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../store_order/StoreOrderController.php | 14 +++++++------- .../store_order/StoreOrderController.php | 17 ++++++++++++++++- 2 files changed, 23 insertions(+), 8 deletions(-) diff --git a/app/admin/controller/store_order/StoreOrderController.php b/app/admin/controller/store_order/StoreOrderController.php index 45a98d163..34307b5cb 100644 --- a/app/admin/controller/store_order/StoreOrderController.php +++ b/app/admin/controller/store_order/StoreOrderController.php @@ -122,12 +122,12 @@ class StoreOrderController extends BaseAdminController $refund = (new \app\common\logic\store_order\StoreOrderLogic()) ->refund($params['order_id'],$money,$money); if($refund){ - $arr = [ - 'amount'=>[ - 'refund'=>$money - ] - ]; - PayNotifyLogic::refund($params['order_id'],$arr); +// $arr = [ +// 'amount'=>[ +// 'refund'=>$money +// ] +// ]; +// PayNotifyLogic::refund($params['order_id'],$arr); return $this->success(); } } @@ -148,7 +148,7 @@ class StoreOrderController extends BaseAdminController PayNotifyLogic::cash_refund($params['order_id']); return $this->success(); } - //支付包支付 + //todo 支付包支付 return $this->fail('退款失败'); } diff --git a/app/store/controller/store_order/StoreOrderController.php b/app/store/controller/store_order/StoreOrderController.php index 668dda2ae..fa80d2f0f 100644 --- a/app/store/controller/store_order/StoreOrderController.php +++ b/app/store/controller/store_order/StoreOrderController.php @@ -357,13 +357,28 @@ class StoreOrderController extends BaseAdminController return $this->fail('支付条码不能为空'); } $params = $this->request->post(); + switch ($pay_type) { + case PayEnum::CASH_PAY: + $recharge_type = 'CASH_PAY'; + break; + case PayEnum::WECHAT_PAY_BARCODE: + $recharge_type = 'INDUSTRYMEMBERS'; + break; + case PayEnum::ALIPAY_BARCODE: + $recharge_type = 'ALI_INDUSTRYMEMBERS'; + break; + default: + $recharge_type = ''; + break; + } $data = [ 'store_id' => $this->adminInfo['store_id'], 'uid' => $params['uid'], 'staff_id' => $this->adminId, 'order_id' => getNewOrderId('CZ'), 'price' => $params['price'], - 'recharge_type' => 'INDUSTRYMEMBERS', + 'recharge_type' =>$recharge_type, + 'type' => 1, ]; $order = UserRecharge::create($data); $order['pay_price'] = $order['price'];