diff --git a/app/common/repositories/store/order/StoreOrderCreateRepository.php b/app/common/repositories/store/order/StoreOrderCreateRepository.php index ae96c3b..0e8cb82 100644 --- a/app/common/repositories/store/order/StoreOrderCreateRepository.php +++ b/app/common/repositories/store/order/StoreOrderCreateRepository.php @@ -581,7 +581,7 @@ class StoreOrderCreateRepository extends StoreOrderRepository } unset($merchantCart); - /*//计算平台券优惠金额 + //计算平台券优惠金额 // if ($total_true_price > 0) { $StoreCouponUser = app()->make(StoreCouponUserRepository::class); $platformCoupon = $StoreCouponUser->validUserPlatformCoupon($uid); @@ -728,7 +728,7 @@ class StoreOrderCreateRepository extends StoreOrderRepository } $usePlatformCouponId = $platformCouponRate['id']; unset($merchantCart); - }*/ + } //积分配置 $sysIntegralConfig = systemConfig(['integral_money', 'integral_status', 'integral_order_rate']); @@ -868,11 +868,11 @@ class StoreOrderCreateRepository extends StoreOrderRepository } unset($merchantCart); - $status = ($address || $order_model || $allow_no_address) ? ($noDeliver ? 'noDeliver' : 'finish') : 'noAddress'; - $order = $merchantCartList; - $total_price = $order_total_price; - $openIntegral = $merIntegralFlag && !$order_type && $sysIntegralConfig['integral_status'] && $sysIntegralConfig['integral_money'] > 0; - $total_coupon = bcadd($order_svip_discount, bcadd(bcadd($total_platform_coupon_price, $order_coupon_price, 2), $order_total_integral_price, 2), 2); + $status = ($address || $order_model || $allow_no_address) ? ($noDeliver ? 'noDeliver' : 'finish') : 'noAddress'; + $order = $merchantCartList; + $total_price = $order_total_price; + $openIntegral = $merIntegralFlag && !$order_type && $sysIntegralConfig['integral_status'] && $sysIntegralConfig['integral_money'] > 0; + $total_coupon = bcadd($order_svip_discount, bcadd(bcadd($total_platform_coupon_price, $order_coupon_price, 2), $order_total_integral_price, 2), 2); return compact( 'order_type', 'order_model', diff --git a/app/event.php b/app/event.php index f388f8a..b2f20a5 100644 --- a/app/event.php +++ b/app/event.php @@ -61,6 +61,8 @@ return [ 'pay_success_order' => [\crmeb\listens\pay\OrderPaySuccessListen::class], 'pay_success_presell' => [\crmeb\listens\pay\PresellPaySuccessListen::class], 'pay_success_meal' => [\crmeb\listens\pay\MealSuccessListen::class], + 'order.paySuccess' => [\crmeb\listens\pay\CustomizePaySuccess::class], + 'order.refundAll' => [\crmeb\listens\pay\CustomizeRefundAll::class], ], 'subscribe' => [], diff --git a/crmeb/listens/pay/CustomizePaySuccess.php b/crmeb/listens/pay/CustomizePaySuccess.php new file mode 100644 index 0000000..1f5a76b --- /dev/null +++ b/crmeb/listens/pay/CustomizePaySuccess.php @@ -0,0 +1,24 @@ +