isEnabled('alipay-period-deduct') || !SettingService::pluginSwitch() || !$basePaymentTypes instanceof OrderPaymentTypes ) { $this->paymentTypes->filterCode[] = 'alipayPeriodDeduct';//黑名单 return; } $orders = $this->paymentTypes->getOrders(); $order = $orders->first(); $orderGoods = $order->hasManyOrderGoods->first(); if ($orders->count() != 1 || ($order->orderGoods->count() != 1) || ($orderGoods->total != 1) || !GoodsService::checkPendantOpen($orderGoods->goods_id) ) { $this->paymentTypes->filterCode[] = 'alipayPeriodDeduct';//黑名单 return; } } public function canUse() { return (request()->type == MemberFactory::LOGIN_APP_CPS || (request()->type == 5 && request()->scope == 'tjpcps') ); // && $this->storeSetting('alipayPeriodDeduct'); } }