feat(store_order): 修改订单支付逻辑,增加现金支付处理

This commit is contained in:
mkm 2024-06-22 18:35:08 +08:00
parent 40aff5aeb3
commit dc6f7503f7

View File

@ -345,6 +345,12 @@ class StoreOrderController extends BaseAdminController
*/
public function rechange_amount()
{
// $order = UserRecharge::where('order_id','CZ1719052252643357')->find();
// $order['pay_price'] = $order['price'];
// d(1);
// PayNotifyLogic::handle('recharge', $order['order_id'], $order);
// d(1);
$pay_type = $this->request->post('pay_type');
$auth_code = $this->request->post('auth_code'); //微信支付条码
if ($auth_code == '' && $pay_type != PayEnum::CASH_PAY) {
@ -361,10 +367,11 @@ class StoreOrderController extends BaseAdminController
];
$order = UserRecharge::create($data);
$order['pay_price'] = $order['price'];
$order['buyer_pay_amount'] = $order['price'];
switch ($pay_type) {
case PayEnum::CASH_PAY:
//现金支付
PayNotifyLogic::handle('recharge', $order['order_id'], $order);
PayNotifyLogic::handle('recharge', $order['order_id'], $order,'CASH_PAY');
return $this->success('现金支付成功', ['id' => $order['id']]);
break;
case PayEnum::WECHAT_PAY_BARCODE: