Eccube\Service\ShoppingService::processPurchase PHP Метод

processPurchase() публичный Метод

購入処理を行う
public processPurchase ( Order $Order )
$Order Eccube\Entity\Order
    public function processPurchase(Order $Order)
    {
        $em = $this->app['orm.em'];
        // 合計金額の再計算
        $this->calculatePrice($Order);
        // 商品公開ステータスチェック、商品制限数チェック、在庫チェック
        $check = $this->isOrderProduct($em, $Order);
        if (!$check) {
            throw new ShoppingException('front.shopping.stock.error');
        }
        // 受注情報、配送情報を更新
        $Order = $this->calculateDeliveryFee($Order);
        $this->setOrderUpdateData($Order);
        // 在庫情報を更新
        $this->setStockUpdate($em, $Order);
        if ($this->app->isGranted('ROLE_USER')) {
            // 会員の場合、購入金額を更新
            $this->setCustomerUpdate($Order, $this->app->user());
        }
    }