@param \Generated\Shared\Transfer\OrderTransfer $orderTransfer

@return bool
357416
public function isAuthorizationApproved(OrderTransfer $orderTransfer)
    {
        return $this->hasApiLogStatus(
            $orderTransfer,
            PayoneApiConstants::REQUEST_TYPE_AUTHORIZATION,
            PayoneApiConstants::RESPONSE_TYPE_APPROVED
        );
    }
990225
public function isPreAuthorizationError(OrderTransfer $orderTransfer)
    {
        return $this->hasApiLogStatus(
            $orderTransfer,
            PayoneApiConstants::REQUEST_TYPE_PREAUTHORIZATION,
            PayoneApiConstants::RESPONSE_TYPE_ERROR
        ) || $this->hasApiLogStatus(
            $orderTransfer,
            PayoneApiConstants::REQUEST_TYPE_PREAUTHORIZATION,
            PayoneApiConstants::RESPONSE_TYPE_TIMEOUT
        );
    }
790821
private function returnTransfertToRaw()
    {
        if ($this->returnTransfert()) {
            if (!curl_setopt($this->ch, CURLOPT_BINARYTRANSFER, true)) {
                $this->close();

                return false;
            }
        }

        return true;
    }
1179024
public function newAction(StockTransfer $stockTransfer)
    {
        $stocktransferitem = new StockTransferItem();
        $stocktransferitem->setStockTransfer($stockTransfer);
        $form = $this->createForm(new StockTransferItemType(), $stocktransferitem);

        return array(
            'stocktransferitem' => $stocktransferitem,
            'form' => $form->createView(),
        );
    }
892462
public function cancelAction(Order $order)
    {
        $order->cancelByBuyer();

        $em = $this->getDoctrine()->getEntityManager();
        $em->persist($order);
        $em->flush();

        return $this->redirect($this->generateUrl('Order_show', array(
            'id' => $order->getNumberForPath()
        )));
    }
398482
public function isCaptureApproved(OrderTransfer $orderTransfer)
    {
        return $this->hasApiLogStatus(
            $orderTransfer,
            PayoneApiConstants::REQUEST_TYPE_CAPTURE,
            PayoneApiConstants::RESPONSE_TYPE_APPROVED
        );
    }
714482
public function setOrderRef($orderRef = '')
    {
        if (settype($orderRef, "string")) {
            if (strlen($orderRef) <= 32) {
                $this->orderRef = $orderRef;

                return true;
            }
            $this->orderRef = null;

            return false;
        }
        $this->orderRef = null;

        return false;
    }
1005795
public function isAuthorizationRedirect(OrderTransfer $orderTransfer)
    {
        return $this->hasApiLogStatus(
            $orderTransfer,
            PayoneApiConstants::REQUEST_TYPE_AUTHORIZATION,
            PayoneApiConstants::RESPONSE_TYPE_REDIRECT
        );
    }
469668
public function checkoutConditionalAvailabilityPreCondition(QuoteTransfer $quoteTransfer, CheckoutResponseTransfer $checkoutResponseTransfer): bool
    {
        return $this->getFactory()
            ->createConditionalAvailabilityPreCondition()
            ->checkCondition($quoteTransfer, $checkoutResponseTransfer);
    }
147942
public function filter(RabbitMqExchangeCollectionTransfer $rabbitMqExchangeCollectionTransfer)
    {
        $filteredRabbitMqExchangeCollectionTransfer = new RabbitMqExchangeCollectionTransfer();

        foreach ($rabbitMqExchangeCollectionTransfer->getRabbitMqExchanges() as $rabbitMqExchangeTransfer) {
            if (!$this->isBlacklisted($rabbitMqExchangeTransfer)) {
                $filteredRabbitMqExchangeCollectionTransfer->addRabbitMqExchange($rabbitMqExchangeTransfer);
            }
        }

        return $filteredRabbitMqExchangeCollectionTransfer;
    }
1307638
public function isPreAuthorizationApproved(OrderTransfer $orderTransfer)
    {
        return $this->hasApiLogStatus(
            $orderTransfer,
            PayoneApiConstants::REQUEST_TYPE_PREAUTHORIZATION,
            PayoneApiConstants::RESPONSE_TYPE_APPROVED
        );
    }
1066304
public function saveOrder(QuoteTransfer $quoteTransfer, CheckoutResponseTransfer $checkoutResponse)
    {
        Propel::getConnection()->beginTransaction();

        $paymentTransfer = $quoteTransfer->getPayment()->getPayone();
        $paymentTransfer->setFkSalesOrder($checkoutResponse->getSaveOrder()->getIdSalesOrder());
        $payment = $this->savePayment($paymentTransfer);

        $paymentDetailTransfer = $paymentTransfer->getPaymentDetail();
        $this->savePaymentDetail($payment, $paymentDetailTransfer);

        Propel::getConnection()->commit();
    }
35438
public function check(SpySalesOrderItem $orderItem)
    {
        $order = $orderItem->getOrder();

        if (isset(self::$resultCache[$this->getName()][$order->getPrimaryKey()])) {
            return self::$resultCache[$this->getName()][$order->getPrimaryKey()];
        }

        $orderTransfer = new OrderTransfer();
        $orderTransfer->fromArray($order->toArray(), true);

        $isSuccess = $this->callFacade($orderTransfer);
        self::$resultCache[$order->getPrimaryKey()] = $isSuccess;

        return $isSuccess;
    }
1373955
public function checkCondition(QuoteTransfer $quoteTransfer, CheckoutResponseTransfer $checkoutResponse): bool
    {
        $dateTimeUntil = new \DateTimeImmutable();
        if (Environment::getInstance()->isDevelopment()) {
            $dateTimeUntil = new \DateTimeImmutable('2019-02-27 11:23:36');
        }

        $dateTimeFrom = $dateTimeUntil->modify('-1 hour');

        $result = $this->conditionalAvailabilityClient->ConditionalAvailabilityLastPingSearch($dateTimeFrom, $dateTimeUntil);

        $isPassed = $result->getTotalHits() > 0;

        if ($isPassed) {
            return true;
        }

        $this->addAvailabilityErrorToCheckoutResponse($checkoutResponse);

        return false;
    }
1117045
public function performReverseRequest(
        OrderTransfer $orderTransfer,
        ComputopApiHeaderPaymentTransfer $computopApiHeaderPayment
    ): ComputopApiReverseResponseTransfer {
        return $this
            ->getFactory()
            ->createReversePaymentRequest()
            ->request($orderTransfer, $computopApiHeaderPayment);
    }
794281
protected function getPayonePaymentTransfer(QuoteTransfer $quoteTransfer, $paymentSelection)
    {
        $method = 'get' . ucfirst($paymentSelection);
        $payonePaymentTransfer = $quoteTransfer->getPayment()->$method();

        return $payonePaymentTransfer;
    }
454439
protected function prepareOrderShipment(OrderTransfer $orderTransfer, AbstractRequestContainer $container): AbstractRequestContainer
    {
        $arrayIt = $container->getIt() ?? [];
        $arrayId = $container->getId() ?? [];
        $arrayPr = $container->getPr() ?? [];
        $arrayNo = $container->getNo() ?? [];
        $arrayDe = $container->getDe() ?? [];
        $arrayVa = $container->getVa() ?? [];

        $key = count($arrayId) + 1;
        $expenses = $orderTransfer->getExpenses();

        $arrayIt[$key] = PayoneApiConstants::INVOICING_ITEM_TYPE_SHIPMENT;
        $arrayId[$key] = PayoneApiConstants::INVOICING_ITEM_TYPE_SHIPMENT;
        $arrayPr[$key] = $this->getDeliveryCosts($expenses);
        $arrayNo[$key] = 1;
        $arrayDe[$key] = 'Shipment';

        $container->setIt($arrayIt);
        $container->setId($arrayId);
        $container->setPr($arrayPr);
        $container->setNo($arrayNo);
        $container->setDe($arrayDe);
        $container->setVa($arrayVa);

        return $container;
    }