Browse Source

支付 订单拦截

master
Lemon 5 years ago
parent
commit
ede3b1478a
  1. 6
      app/Controller/PaymentController.php

6
app/Controller/PaymentController.php

@ -12,7 +12,8 @@ use App\Service\PurchaseLimitServiceInterface;
use EasyWeChat\Factory;
use Hyperf\DbConnection\Db;
use Hyperf\Guzzle\CoroutineHandler;
use App\Constants\LogLabel;
use App\Commons\Log;
class PaymentController extends BaseController
{
/**
@ -52,7 +53,8 @@ class PaymentController extends BaseController
$result = $this->purchaseLimitService->PurchaseLimit($orderGoods);
if(!$result){
Db::rollBack();
return '同一个订单不能购买多个特价商品';
$this->log->event(LogLabel::ORDER_LOG, ['msg'=> '支付失败,同一订单不能存在多个特价商品','global_order_id' => $orderMain->global_order_id]);
return $this->result(ErrorCode::PAY_FAILURE, $data,'同一订单不能存在多个特价商品');
}
$result = $app->order->unify([

Loading…
Cancel
Save