This commit is contained in:
mkm 2024-06-24 16:47:55 +08:00
commit 29ffd9f8c5
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 = (new \app\common\logic\store_order\StoreOrderLogic())
->refund($params['order_id'],$money,$money); ->refund($params['order_id'],$money,$money);
if($refund){ if($refund){
$arr = [ // $arr = [
'amount'=>[ // 'amount'=>[
'refund'=>$money // 'refund'=>$money
] // ]
]; // ];
PayNotifyLogic::refund($params['order_id'],$arr); // PayNotifyLogic::refund($params['order_id'],$arr);
return $this->success(); return $this->success();
} }
} }
@ -148,7 +148,7 @@ class StoreOrderController extends BaseAdminController
PayNotifyLogic::cash_refund($params['order_id']); PayNotifyLogic::cash_refund($params['order_id']);
return $this->success(); return $this->success();
} }
//支付包支付 //todo 支付包支付
return $this->fail('退款失败'); return $this->fail('退款失败');
} }

View File

@ -357,13 +357,28 @@ class StoreOrderController extends BaseAdminController
return $this->fail('支付条码不能为空'); return $this->fail('支付条码不能为空');
} }
$params = $this->request->post(); $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 = [ $data = [
'store_id' => $this->adminInfo['store_id'], 'store_id' => $this->adminInfo['store_id'],
'uid' => $params['uid'], 'uid' => $params['uid'],
'staff_id' => $this->adminId, 'staff_id' => $this->adminId,
'order_id' => getNewOrderId('CZ'), 'order_id' => getNewOrderId('CZ'),
'price' => $params['price'], 'price' => $params['price'],
'recharge_type' => 'INDUSTRYMEMBERS', 'recharge_type' =>$recharge_type,
'type' => 1,
]; ];
$order = UserRecharge::create($data); $order = UserRecharge::create($data);
$order['pay_price'] = $order['price']; $order['pay_price'] = $order['price'];