Returns if Amazon pay is assigned available shipping ways

@param string $sShipSet the string to quote

@return boolean
@throws oxConnectionException
@throws oxSystemComponentException
174638
protected function _getShippingAvailableForPayment($sShipSet)
    {
        $oDatabase = $this->_getContainer()->getDatabase();

        $sSql = "SELECT OXOBJECTID
            FROM oxobject2payment
            WHERE OXOBJECTID = {$oDatabase->quote($sShipSet)}
                AND OXPAYMENTID = {$oDatabase->quote('bestitamazon')}
                AND OXTYPE = 'oxdelset'
                AND OXTYPE = 'oxdelset' LIMIT 1";

        $sShippingId = $oDatabase->getOne($sSql);
        return ($sShippingId) ? true : false;
    }
1186611
protected function _checkOrderExist($sOxId = null)
    {
        if (!$sOxId) {
            return false;
        }

        // We force reading from master to prevent issues with slow replications or open transactions (see ESDEV-3804).
        $masterDb = \OxidEsales\Eshop\Core\DatabaseProvider::getMaster();
        if ($masterDb->getOne('select oxid from oxorder where oxid = ' . $masterDb->quote($sOxId))) {
            return true;
        }

        return false;
    }
1066718
public function rset()
    {
        $this->send('RSET');
        // MS ESMTP doesn't follow RFC according to ZF tracker, see [ZF-1377]
        $expected = array(
            $this->config['responseCodes']['SMTP_GENERIC_SUCCESS'],
            $this->config['responseCodes']['SMTP_CONNECT_SUCCESS'],
            // hotmail returns this o_O
            $this->config['responseCodes']['SMTP_TRANSACTION_FAILED']
        );
        $this->expect($expected, $this->config['commandTimeouts']['rset']);
        $this->state['mail'] = false;
        $this->state['rcpt'] = false;
    }
1050486
protected function _OxpsPaymorrowOxPayment_isValidPayment_parent($aDynValue, $sShopId, $oUser, $dBasketPrice,
                                                                     $sShipSetId)
    {
        return parent::isValidPayment($aDynValue, $sShopId, $oUser, $dBasketPrice, $sShipSetId);
    }
109383
protected function getShippingOptionsData($shippingMethods)
    {
        $shippingOptionsModel = $this->shippingOptionsInterfaceFactory->create();

        $shippingTaxModel = $this->shippingTaxInterfaceFactory->create();
        $shippingTaxModel->setAmount(0);

        $shippingOptionsModel->setShippingOptions($shippingMethods);
        $shippingOptionsModel->setTaxResult($shippingTaxModel);

        return $shippingOptionsModel;
    }
239118
private function checkConciliation($payment, $order)
    {
        if ($order->getStatus() == $this->getStatusFromPaymentKey($payment->getStatus()))
            return true;
        return false;
    }
807730
protected function ConfirmEasyCashResponse($sPayId, $sXID)
    {
        $bConfirmed = false;
        $aParam = array('PayID' => $sPayId, 'XID' => $sXID);
        $aResponse = $this->SendRequestToEasyCash(self::EASY_CASH_CONFIRM_PATH, $aParam);
        if (is_array($aResponse) && stristr($aResponse['header'], 'HTTP/1.1 200 OK')) {
            $bConfirmed = true;
        } else {
            TTools::WriteLogEntry("EasyCash ConfirmEasyCashResponse Error: UNABLE TO CONFIRM; sPayId: {$sPayId}; sXID: {$sXID}".print_r($aResponse, true), 1, __FILE__, __LINE__);
        }

        return $bConfirmed;
    }
500244
public function isPaid()
    {
        $statuses = $this->config()->get("paid_statuses");

        if (!is_array($statuses)) {
            return $this->Status == $statuses;
        } else {
            return in_array($this->Status, $statuses);
        }
    }
221076
public function checkCondition(QuoteTransfer $quoteTransfer, CheckoutResponseTransfer $checkoutResponse): bool
    {
        $isPassed = true;

        $groupedItems = $this->groupItemsBySkuAndDeliveryDate($quoteTransfer->getItems());

        foreach ($groupedItems as $deliveryDate => $skus) {
            foreach ($skus as $sku => $quantity) {

                $isAvailable = $this->isProductAvailable(
                    $deliveryDate,
                    $sku,
                    $quantity,
                    $this->conditionalAvailabilityConfig->getDefaultWarehouse()
                );

                if ($isAvailable) {
                    continue;
                }

                $this->addAvailabilityErrorToCheckoutResponse($checkoutResponse, $sku);
                $isPassed = false;
            }
        }

        return $isPassed;
    }
344782
static public function isPaymentMode($paymentMode) {
    return ((string) $paymentMode == Connect2PayClient::PAYMENT_MODE_SINGLE ||
        (string) $paymentMode == Connect2PayClient::PAYMENT_MODE_ONSHIPPING ||
        (string) $paymentMode == Connect2PayClient::PAYMENT_MODE_RECURRENT ||
        (string) $paymentMode == Connect2PayClient::PAYMENT_MODE_INSTALMENTS);
  }
1081179
static public function isPaymentNetwork($paymentNetwork) {
    return ((string) $paymentNetwork == Connect2PayClient::PAYMENT_NETWORK_SOFORT ||
        (string) $paymentNetwork == Connect2PayClient::PAYMENT_NETWORK_PRZELEWY24 ||
        (string) $paymentNetwork == Connect2PayClient::PAYMENT_NETWORK_IDEAL ||
        (string) $paymentNetwork == Connect2PayClient::PAYMENT_NETWORK_GIROPAY ||
        (string) $paymentNetwork == Connect2PayClient::PAYMENT_NETWORK_EPS ||
        (string) $paymentNetwork == Connect2PayClient::PAYMENT_NETWORK_POLI ||
        (string) $paymentNetwork == Connect2PayClient::PAYMENT_NETWORK_DRAGONPAY ||
        (string) $paymentNetwork == Connect2PayClient::PAYMENT_NETWORK_TRUSTLY);
  }
722412
public function isActionAvailable($action, $payment = null)
    {
        if ($payment) {
            $this->setPayment($payment);
        }

        $payment = $this->getPayment();

        $isAvailable = in_array($action, $this->getAvailableActions($payment->getAction(), $payment->getStatus()));

        if ($isAvailable) {
            $isAvailable = false;

            switch ($action) {
                case 'refund':
                    $isAvailable = ($payment->getAmount() > $payment->getRefundedAmount());
                    break;
            }
        }

        return $isAvailable;
    }
1370977
protected function _setOrderTransactionErrorStatus(oxOrder $oOrder, stdClass $oData, $sStatus = null)
    {
        if (isset($oData->Error->Code) && (bool) $oData->Error->Code !== false) {
            if ($sStatus === null) {
                $sStatus = 'AMZ-Error-'.$oData->Error->Code;
            }

            $oOrder->assign(array('oxtransstatus' => $sStatus));
            $oOrder->save();

            return true;
        }

        return false;
    }
953865
public function validateEmptyShippingAmount(CartInterface $cart)
    {
        $shippingAmount = $cart->getShippingAmount();
        if (!($shippingAmount instanceof MoneyInterface)) {
            $cart
                ->setShippingAmount(
                    $this
                        ->emptyMoneyWrapper
                        ->get()
                );
        }
    }
582080
public function isCaptureOnShipment()
    {
        $isPaymentOnShipmentStored = $this->GetUserPaymentDataItem(self::PARAMETER_IS_PAYMENT_ON_SHIPMENT);
        if (false !== $isPaymentOnShipmentStored) {
            return '1' === $isPaymentOnShipmentStored;
        }

        $config = $this->getAmazonPaymentGroupConfig($this->getActivePortalId());

        return $config->isCaptureOnShipment();
    }
1212665
public static function setPayStatus($orderId, $paymentId, $status, $params)
    {
        if (($model = static::findOne(['id' => $orderId])) != null && $status == true) {
            $coin = static::getCoin($model->money, $model->currency);
            coin($model->user_id, 'purchase', $coin);
            return true;
        }
        return false;
    }
1326593
public function getPayPalPayCostVat()
    {
        $paymentVAT = 0.0;

        $paymentCost = $this->getCosts('oxpayment');
        if ($paymentCost && $paymentCost->getVatValue()) {
            $paymentVAT = $paymentCost->getVatValue();
        }

        return $paymentVAT;
    }