收银台逻辑充值方式区分

This commit is contained in:
liu 2024-06-24 16:42:41 +08:00
parent 6566fcea3d
commit 87a492b834
2 changed files with 23 additions and 8 deletions

View File

@ -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('退款失败');
}

View File

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