@param string $cardId
@param string $orderId
@param int    $quantity

@return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string
354415
public function confirm(string $cardId, string $orderId, int $quantity)
    {
        return $this->httpPostJson('card/pay/confirm', [
            'card_id' => $cardId,
            'order_id' => $orderId,
            'quantity' => $quantity,
        ]);
    }
1199049
public function getOrder($orderId)
    {
        $resource = 'campaigns/' . $this->campaignId . '/orders/' . $orderId . '.json';

        $response = $this->sendRequest('GET', $this->getServiceUrl($resource));

        $decodedResponseBody = $this->getDecodedBody($response->getBody());

        $getOrderResponse = new GetOrderResponse($decodedResponseBody);
        return $getOrderResponse->getOrder();
    }
949416
public function get($orderId, array $parameters = [])
    {
        if (empty($orderId) || strpos($orderId, self::RESOURCE_ID_PREFIX) !== 0) {
            throw new ApiException("Invalid order ID: '{$orderId}'. An order ID should start with '".self::RESOURCE_ID_PREFIX."'.");
        }

        return parent::rest_read($orderId, $parameters);
    }
1139537
public function invoice($orderId, $invoiceKey)
    {
        $transformer = new InvoiceTransformer(self::STATUS_PAID, $invoiceKey);
        $body        = $transformer->output();

        /** @var \SkyHub\Api\Handler\Response\HandlerInterface $responseHandler */
        $responseHandler = $this->service()->post($this->baseUrlPath("$orderId/invoice"), $body);
        return $responseHandler;
    }
1037264
public function findByOrderId($orderId, $locale)
    {
        $result = array();
        $items = $this->getShippingRepository()->findByOrderId($orderId, $locale);
        foreach ($items as $item) {
            $result[] = $this->shippingFactory->createApiEntity($item, $locale);
        }
        return $result;
    }
1222409
public function get(string $cardId, string $encryptCode)
    {
        $params = [
            'card_id' => $cardId,
            'encrypt_code' => $encryptCode,
        ];

        return $this->httpPostJson('cgi-bin/card/invoice/reimburse/getinvoiceinfo', $params);
    }
485107
public function loadByOrderIdAndQuoteId($orderId, $quoteId)
    {
        $collection = $this->addFieldToFilter('order_id', $orderId)
            ->addFieldToFilter('quote_id', $quoteId)
            ->setPageSize(1);

        if ($collection->getSize()) {
            return $collection->getFirstItem();
        }

        return false;
    }
802171
public function countByOrderId($orderId, $statusIds = array(), $comparator = "=")
    {
        return $this->getShippingRepository()->countByOrderId($orderId, $statusIds, $comparator);
    }
106518
public function getCard($cardID, $token)
    {
        $httpResponse = $this->httpClient->send(
            new GetHttpRequest(
                sprintf("%s/card/v5/%s", $this->serviceUrl, $cardID),
                null,
                ["Authorization" => sprintf("Virgil %s", $token)]
            )
        );

        if (!$httpResponse->getHttpStatusCode()
                          ->isSuccess()) {
            return $this->parseErrorResponse($httpResponse->getBody());
        }

        $rawSignedModel = RawSignedModel::RawSignedModelFromJson($httpResponse->getBody());

        return new ResponseModel($httpResponse->getHeaders(), $rawSignedModel);
    }
814936
public function executePayment($amount, &$order)
    {
        $success = parent::executePayment($amount, $order);
        $session = $this->getSession();

        if ( ($session->getVariable('paymentid') == 'oxidpaypal')
             || ($session->getBasket()->getPaymentId() == 'oxidpaypal')
        ) {
            $this->setPayPalOxOrder($order);
            $success = $this->doExpressCheckoutPayment();
        }

        return $success;
    }
1213739
public function getOrder($orderId)
    {
        if (strrpos(str_replace('\\', '/', DIR_APPLICATION), '/catalog/') === strlen(DIR_APPLICATION) - strlen('/catalog/')) {
            // We are in the catalog section, use the checkout/order model as
            // ModelAccountOrder::getOrder() also checks on user_id!
            if ($this->model_checkout_order === null) {
                $this->load->model('checkout/order');
            }
            return $this->model_checkout_order->getOrder($orderId);
        } else {
            // We are in the admin section, we can use the normal order model.
            return $this->getOrderModel()->getOrder($orderId);
        }
    }
1017099
public function getOrderDetails($orderId)
    {
        if (is_null($orderId) || $orderId == '') {
            throw new Exception('The orderId is required to get the details or an order.');
        }

        $params = array(
            'method' => 'sp.order.get_details',
            'order_id' => $orderId
        );

        return $this->_makeApiRequest($params);
    }
1361272
public static MozuUrl getOrderNotesUrl(String orderId)
	{
		UrlFormatter formatter = new UrlFormatter("/api/commerce/orders/{orderId}/notes");
		formatter.formatUrl("orderId", orderId);
		return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
	}
1312212
public function updateStock($cardId, $amount)
    {
        if (!$amount) {
            return true;
        }

        $key = $amount > 0 ? 'increase_stock_value' : 'reduce_stock_value';

        $params = array(
            'card_id' => $cardId,
            $key => abs($amount),
        );

        return $this->http->jsonPost(self::API_UPDATE_STOCK, $params);
    }
557694
protected function getOrder($orderId)
    {
        if (null == $order = OrderQuery::create()->findPk($orderId)) {
            $this->getLog()->addError(
                $this->getTranslator()->trans("Unknown order ID:  %id", array('%id' => $orderId))
            );
        }

        return $order;
    }
1201370
public function updateItemInCart($productid, $quantity)
	{
		$olderProduct = ShoppingCartItem::where('product_id', '=', $productid)->where('user_id', '=', Auth::user()->id)->first();
		if($olderProduct != null) {
			$olderProduct->qty = $quantity;
			$olderProduct->save(); 
		}
	}
1123466
public function getOrder($orderId)
    {
        $result = $this->wechat->httpRaw(self::WECHAT_ORDER_GET_PREFIX, [
            'order_id' => $orderId
        ], [
            'access_token' => $this->wechat->getAccessToken()
        ]);
        return isset($result['errmsg']) && $result['errmsg'] == 'success' ? $result['order'] : false;
    }