Helper/Cart.php
public function getBoltpayOrder($paymentOnly, $placeOrderPayload, $storeId = 0)
    {
        //Get cart data
        $cart = $this->getCartData($paymentOnly, $placeOrderPayload);
        if (!$cart) {
            return;
        }

        // cache the session id
        $this->sessionHelper->saveSession($cart['order_reference'], $this->checkoutSession);

        // If storeId was missed through request, then try to get it from the session quote.
        if (!$storeId && $this->checkoutSession->getQuote()) {
            $storeId = $this->checkoutSession->getQuote()->getStoreId();
        }

        $apiKey = $this->configHelper->getApiKey($storeId);

        //Request Data
        $requestData = $this->dataObjectFactory->create();
        $requestData->setApiData(['cart' => $cart]);
        $requestData->setDynamicApiUrl(ApiHelper::API_CREATE_ORDER);
        $requestData->setApiKey($apiKey);

        //Build Request
        $request = $this->apiHelper->buildRequest($requestData);
        $result  = $this->apiHelper->sendRequest($request);
        return $result;
    }
public function getBoltpayOrder($paymentOnly, $placeOrderPayload, $storeId = 0)
    {
        //Get cart data
        $cart = $this->getCartData($paymentOnly, $placeOrderPayload);
        if (!$cart) {
            return;
        }

        // cache the session id
        $this->sessionHelper->saveSession($cart['order_reference'], $this->checkoutSession);

        // If storeId was missed through request, then try to get it from the session quote.
        if (!$storeId && $this->checkoutSession->getQuote()) {
            $storeId = $this->checkoutSession->getQuote()->getStoreId();
        }

        $apiKey = $this->configHelper->getApiKey($storeId);

        //Request Data
        $requestData = $this->dataObjectFactory->create();
        $requestData->setApiData(['cart' => $cart]);
        $requestData->setDynamicApiUrl(ApiHelper::API_CREATE_ORDER);
        $requestData->setApiKey($apiKey);

        //Build Request
        $request = $this->apiHelper->buildRequest($requestData);
        $result  = $this->apiHelper->sendRequest($request);
        return $result;
    }
public function getBoltpayOrder ( $ paymentOnly , $ placeOrderPayload , $ storeId = 0 ) { //Get cart data $ cart = $ this -> getCartData ( $ paymentOnly , $ placeOrderPayload ) ; if ( ! $ cart ) { return ; } // cache the session id $ this -> sessionHelper -> saveSession ( $ cart [ 'order_reference' ] , $ this -> checkoutSession ) ; // If storeId was missed through request, then try to get it from the session quote. if ( ! $ storeId && $ this -> checkoutSession -> getQuote ( ) ) { $ storeId = $ this -> checkoutSession -> getQuote ( ) -> getStoreId ( ) ; } $ apiKey = $ this -> configHelper -> getApiKey ( $ storeId ) ; //Request Data $ requestData = $ this -> dataObjectFactory -> create ( ) ; $ requestData -> setApiData ( [ 'cart' => $ cart ] ) ; $ requestData -> setDynamicApiUrl ( ApiHelper :: API_CREATE_ORDER ) ; $ requestData -> setApiKey ( $ apiKey ) ; //Build Request $ request = $ this -> apiHelper -> buildRequest ( $ requestData ) ; $ result = $ this -> apiHelper -> sendRequest ( $ request ) ; return $ result ; }
Create order on bolt

@param bool   $paymentOnly              flag that represents the type of checkout
@param string $placeOrderPayload        additional data collected from the (one page checkout) page,
i.e. billing address to be saved with the order

@param int    $storeId
@return Response|void
@throws LocalizedException
@throws Zend_Http_Client_Exception
Create order on bolt