feat: 修改支付逻辑以处理不同支付方式
This commit is contained in:
parent
f6e43fc75d
commit
6478f0f86e
@ -435,9 +435,8 @@ class OrderLogic extends BaseLogic
|
|||||||
// $capitalFlowLogic->storeIncome('store_order_income', 'order', $data['id'], $financeFlow['number']);
|
// $capitalFlowLogic->storeIncome('store_order_income', 'order', $data['id'], $financeFlow['number']);
|
||||||
// }
|
// }
|
||||||
$order=StoreOrder::where('id',$data['id'])->find();
|
$order=StoreOrder::where('id',$data['id'])->find();
|
||||||
PayNotifyLogic::afterPay($order);
|
// PayNotifyLogic::afterPay($order);
|
||||||
PayNotifyLogic::descStock($order['id']);
|
PayNotifyLogic::descStock($order['id']);
|
||||||
|
|
||||||
if($order['uid'] && $order['total_price'] >= 500){
|
if($order['uid'] && $order['total_price'] >= 500){
|
||||||
$user_number = bcmul($order['pay_price'], '0.10', 2);
|
$user_number = bcmul($order['pay_price'], '0.10', 2);
|
||||||
User::where('id', $order['uid'])->inc('integral', $user_number)->update();
|
User::where('id', $order['uid'])->inc('integral', $user_number)->update();
|
||||||
|
@ -88,14 +88,14 @@ class PayNotifyLogic extends BaseLogic
|
|||||||
$order['pay_price'] = $oldUser;
|
$order['pay_price'] = $oldUser;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
self::addUserSing($order);
|
// self::addUserSing($order);
|
||||||
$capitalFlowDao = new CapitalFlowLogic($user);
|
$capitalFlowDao = new CapitalFlowLogic($user);
|
||||||
$capitalFlowDao->userExpense('user_order_balance_pay', 'order', $order['id'], $order['pay_price'], '', 0, $order['store_id']);
|
$capitalFlowDao->userExpense('user_order_balance_pay', 'order', $order['id'], $order['pay_price'], '', 0, $order['store_id']);
|
||||||
self::dealProductLog($order);
|
self::dealProductLog($order);
|
||||||
if ($order['shipping_type'] == 3) {
|
if ($order['shipping_type'] == 3) {
|
||||||
self::descStock($order['id']);
|
self::descStock($order['id']);
|
||||||
}
|
}
|
||||||
// self::afterPay($order);
|
self::afterPay($order);
|
||||||
// Redis::send('push-platform-print', ['id' => $order['id']], 60);
|
// Redis::send('push-platform-print', ['id' => $order['id']], 60);
|
||||||
// PushService::push('store_merchant_' . $order['store_id'], $order['store_id'], ['type' => 'store_merchant', 'msg' => '您有一笔新的订单']);
|
// PushService::push('store_merchant_' . $order['store_id'], $order['store_id'], ['type' => 'store_merchant', 'msg' => '您有一笔新的订单']);
|
||||||
}
|
}
|
||||||
@ -185,7 +185,7 @@ class PayNotifyLogic extends BaseLogic
|
|||||||
// if ($user['user_ship'] == 1) {
|
// if ($user['user_ship'] == 1) {
|
||||||
// self::dealVipAmount($order, PayEnum::PURCHASE_FUNDS);
|
// self::dealVipAmount($order, PayEnum::PURCHASE_FUNDS);
|
||||||
// }
|
// }
|
||||||
self::addUserSing($order);
|
// self::addUserSing($order);
|
||||||
if ($extra && $extra['store_id']) {
|
if ($extra && $extra['store_id']) {
|
||||||
$params = [
|
$params = [
|
||||||
'verify_code' => $order['verify_code'],
|
'verify_code' => $order['verify_code'],
|
||||||
@ -199,7 +199,7 @@ class PayNotifyLogic extends BaseLogic
|
|||||||
// self::descStock($order['id']);
|
// self::descStock($order['id']);
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// self::afterPay($order);
|
self::afterPay($order);
|
||||||
// Redis::send('push-platform-print', ['id' => $order['id']], 60);
|
// Redis::send('push-platform-print', ['id' => $order['id']], 60);
|
||||||
// PushService::push('store_merchant_' . $order['store_id'], $order['store_id'], ['type' => 'store_merchant', 'msg' => '您有一笔新的订单']);
|
// PushService::push('store_merchant_' . $order['store_id'], $order['store_id'], ['type' => 'store_merchant', 'msg' => '您有一笔新的订单']);
|
||||||
}
|
}
|
||||||
@ -232,14 +232,14 @@ class PayNotifyLogic extends BaseLogic
|
|||||||
$user = User::where('id', $order['uid'])->find();
|
$user = User::where('id', $order['uid'])->find();
|
||||||
if ($order->pay_type == OrderEnum::CASHIER_ORDER_PAY || $order->pay_type == OrderEnum::CASHIER_ORDER_ALI_PAY) { //收银台支付
|
if ($order->pay_type == OrderEnum::CASHIER_ORDER_PAY || $order->pay_type == OrderEnum::CASHIER_ORDER_ALI_PAY) { //收银台支付
|
||||||
$order->status = 2;
|
$order->status = 2;
|
||||||
// self::afterPay($order, $extra['transaction_id']);
|
|
||||||
} else {
|
} else {
|
||||||
$capitalFlowDao = new CapitalFlowLogic($user);
|
$capitalFlowDao = new CapitalFlowLogic($user);
|
||||||
//微信支付和用户余额无关
|
//微信支付和用户余额无关
|
||||||
$capitalFlowDao->userExpense('user_order_pay', 'order', $order['id'], $order->pay_price, '', 1, $order['store_id']);
|
$capitalFlowDao->userExpense('user_order_pay', 'order', $order['id'], $order->pay_price, '', 1, $order['store_id']);
|
||||||
}
|
}
|
||||||
$order->save();
|
$order->save();
|
||||||
self::addUserSing($order);
|
self::afterPay($order, $extra['transaction_id']);
|
||||||
|
// self::addUserSing($order);
|
||||||
self::dealProductLog($order);
|
self::dealProductLog($order);
|
||||||
if ($order['shipping_type'] == 3) {
|
if ($order['shipping_type'] == 3) {
|
||||||
self::descStock($order['id']);
|
self::descStock($order['id']);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user