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'];