Check if PayPal is used for sub-shops.

@return bool
551665
public static function isPayPalActiveOnSubShops()
    {
        $active = false;
        $config = \OxidEsales\Eshop\Core\Registry::getConfig();
        $extensionChecker = oxNew(\OxidEsales\PayPalModule\Core\ExtensionChecker::class);
        $shops = $config->getShopIds();
        $activeShopId = $config->getShopId();

        foreach ($shops as $shopId) {
            if ($shopId != $activeShopId) {
                $extensionChecker->setShopId($shopId);
                $extensionChecker->setExtensionId('oepaypal');
                if ($extensionChecker->isActive()) {
                    $active = true;
                    break;
                }
            }
        }

        return $active;
    }
1360144
protected function verifyPayment()
    {
        $fields = array(
            "merchantID" => $this->config->get('gateway.saman.merchant'),
            "RefNum" => $this->refId,
            "password" => $this->config->get('gateway.saman.password'),
        );


        try {
            $soap = new SoapClient($this->serverUrl);
            $response = $soap->VerifyTransaction($fields["RefNum"], $fields["merchantID"]);

        } catch (\SoapFault $e) {
            $this->transactionFailed();
            $this->newLog('SoapFault', $e->getMessage());
            throw $e;
        }

        $response = intval($response);

        if ($response == $this->amount) {
            $this->transactionSucceed();
            return true;
        }

        //Reverse Transaction
        if($response>0){
            try {
                $soap = new SoapClient($this->serverUrl);
                $response = $soap->ReverseTransaction($fields["RefNum"], $fields["merchantID"], $fields["password"], $response);

            } catch (\SoapFault $e) {
                $this->transactionFailed();
                $this->newLog('SoapFault', $e->getMessage());
                throw $e;
            }
        }

        //
        $this->transactionFailed();
        $this->newLog($response, SamanException::$errors[$response]);
        throw new SamanException($response);
        


    }
485985
protected function ActivePageIsRegisterAfterShopping()
    {
        $bActivePageIsRegisterAfterShopping = false;
        $oURLData = TCMSSmartURLData::GetActive();
        $oShop = TdbShop::GetInstance($oURLData->iPortalId);
        $sNodeId = $oShop->GetSystemPageNodeId('register-after-shopping');
        $oActivePage = $this->getActivePageService()->getActivePage();
        if ($oActivePage && $sNodeId == $oActivePage->GetMainTreeId()) {
            $bActivePageIsRegisterAfterShopping = true;
        }

        return $bActivePageIsRegisterAfterShopping;
    }
901017
public function hasVisibleSubCats()
    {
        if ($this->_blVisibleSubCats === null) {
            $this->_blVisibleSubCats = false;
            if (($this->_getVendorId() && $oVendorTree = $this->getVendorTree())) {
                if (($oVendor = $this->getActVendor())) {
                    if ($oVendor->getId() == 'root') {
                        $this->_blVisibleSubCats = $oVendorTree->count();
                        $this->_oSubCatList = $oVendorTree;
                    }
                }
            }
        }

        return $this->_blVisibleSubCats;
    }
1154831
public function getPaymentStatus()
    {
        $state = $this->getValue('oepaypal_paymentstatus');
        if (empty($state)) {
            $state = self::PAYPAL_ORDER_STATE_COMPLETED;
        }

        return $state;
    }
1066379
public function checkRegistryRequestsAnswers()
    {
        if ($this->_gemsData) {
            if ($this->currentUser instanceof \Gems_User_User) {
                $this->_gemsData = $this->currentUser->applyGroupMask($this->_gemsData);
            }
        } else {
            if ($this->db instanceof \Zend_Db_Adapter_Abstract) {
                $this->refresh();
            } else {
                return false;
            }
        }

        return $this->exists;
    }
1273752
public function HasAvailablePaymentMethods()
    {
        $bValidMethods = false;
        $oMethods = &$this->GetValidPaymentMethods();
        $bValidMethods = ($oMethods->Length() > 0);

        return $bValidMethods;
    }
1324089
public function isNewPayPalOrder()
    {
        $active = false;

        $order = $this->getEditObject();
        $orderPayPal = $order->getPayPalOrder();
        if ($this->isPayPalOrder() && $orderPayPal->isLoaded()) {
            $active = true;
        }

        return $active;
    }
556219
protected function isCompany()
    {
        // Note: companies outside EU must also fill in their vat number!? Even
        // if there's no way to check it with a webservice like VIES.
        return !empty($this->invoice[Tag::Customer][Tag::CompanyName1]) && !empty($this->invoice[Tag::Customer][Tag::VatNumber]);
    }
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);
        }
    }
151728
public function hasDiscount()
    {
        return $this->invoice->subtotal > 0 &&
            $this->invoice->subtotal != $this->invoice->total &&
            ! is_null($this->invoice->discount);
    }
518051
public function isSuccessful()
    {
        $isHttpSuccess = parent::isSuccessful();
        $isPurchaseSuccess = false;

        if (isset($this->data['paymentStatus']) && $this->data['paymentStatus'] == $this->successfulPaymentStatus) {
            $isPurchaseSuccess = true;
        }

        return ($isHttpSuccess && $isPurchaseSuccess);
    }
308985
public function inTransaction(): bool
    {
        $status = pg_transaction_status($this->getResource());

        return PGSQL_TRANSACTION_INTRANS === $status || PGSQL_TRANSACTION_INERROR === $status;
    }
139870
public function isDemoShop()
    {
        if ($this->_blDemoShop == null) {
            $this->_blDemoShop = \OxidEsales\Eshop\Core\Registry::getConfig()->isDemoShop();
        }

        return $this->_blDemoShop;
    }
1182728
public function isPaymentActive()
    {
        $result = false;
        if ($payPalPayment = $this->getPayment()) {
            $result = $payPalPayment->oxpayments__oxactive->value ? true : false;
        }

        return $result;
    }
524970
function in_special_checkout() {
    if ((defined('MODULE_PAYMENT_PAYPALWPP_STATUS') && MODULE_PAYMENT_PAYPALWPP_STATUS == 'True') &&
             !empty($_SESSION['paypal_ec_token']) &&
             !empty($_SESSION['paypal_ec_payer_id']) &&
             !empty($_SESSION['paypal_ec_payer_info'])) {
      $this->flagDisablePaymentAddressChange = true;
      return true;
    }
  }
12486
public function isSuccessful()
    {
        // get response code
        $code = $this->getHttpResponseCode();

        if ($code === 200) {  // OK
            return true;
        }

        if ($code === 201) {   // Created
            if ($this->getTransactionType() === 'payment') {
                return $this->isApproved();
            }
            return true;
        }

        if ($code === 202 && $this->isPending()) {   // Accepted
            return true;
        }

        return false;
    }