Returns order payment status which should be set after order creation or IPN.

@return string|null
494233
public function getStatus()
    {
        if (is_null($this->getOrder())) {
            return;
        }

        $status = $this->getOrderPaymentStatusFinal();

        if (is_null($status)) {
            $status = $this->getOrderPaymentStatusPaymentValid();
        }
        if (is_null($status)) {
            $status = $this->getOrderPaymentStatusPayments();
        }

        return $status;
    }
682646
public function getOrderPaymentStatusCalculator()
    {
        /** @var \OxidEsales\PayPalModule\Model\OrderPaymentStatusCalculator $statusCalculator */
        $statusCalculator = oxNew(\OxidEsales\PayPalModule\Model\OrderPaymentStatusCalculator::class);
        $statusCalculator->setOrder($this->getEditObject()->getPayPalOrder());

        return $statusCalculator;
    }
116738
public function PostProcessExternalPaymentHandlerHook()
    {
        $bPaymentTransmitOk = parent::PostProcessExternalPaymentHandlerHook();
        if ($bPaymentTransmitOk) {
            $oGlobal = TGlobal::instance();
            $aUserData = $oGlobal->GetUserData();
            $bPaymentTransmitOk = $this->GetTransactionStatus($aUserData['PAYID']);
        }

        return $bPaymentTransmitOk;
    }
15847
public function getStatus(){
        $rest = $this->getService( self::API_VPN_CLIENT_STATUS);
        $rest->GET();

        return $rest->getResult( models\VPN\Client\Status::class);
    }
991141
public function getTermsOfPayment()
    {
        if ($terms = $this->entity->getTermsOfPayment()) {
            return array(
                'id' => $terms->getId(),
                'terms' => $terms->getTerms()
            );
        }

        return null;
    }
261527
protected function validatePaymentAddressOrder()
    {
        $field = 'payment_address';

        if ($this->isExcluded($field)) {
            return null;
        }

        $value = $this->getSubmitted($field);

        if (!isset($value) && $this->isUpdating()) {
            $this->unsetSubmitted($field);
            return null;
        }

        if (empty($value) && !$this->isError('shipping_address')) {
            $value = $this->getSubmitted('shipping_address');
        }

        $label = $this->translation->text('Payment address');

        if (empty($value)) {
            $this->setErrorRequired($field, $label);
            return false;
        }

        if (!is_numeric($value)) {
            $this->setErrorNumeric($field, $label);
            return false;
        }

        $address = $this->address->get($value);

        if (empty($address)) {
            $this->setErrorUnavailable($field, $label);
            return false;
        }

        $this->setSubmitted($field, $value);
        return true;
    }
682414
public function getPartialPayments()
    {
        if (!$this->isInDB()) {
            return null;
        }

        return Payment::get()
            ->filter('InitialPaymentID', $this->ID)
            ->sort(array('Created' => 'DESC', 'ID' => 'DESC'));
    }
744967
public function getOrder()
    {
        if ($this->order === null) {
            $orderPayment = $this->getOrderPayment();
            $order = $this->getOrderFromPayment($orderPayment);
            $this->setOrder($order);
        }

        return $this->order;
    }
34715
protected function getSubmittedOrderCheckout()
    {
        $submitted = $this->getSubmitted();
        $submitted += $this->data_form['order'];
        $submitted['cart'] = $this->data_cart;

        $submitted['data']['user'] = array(
            'ip' => $this->server->remoteAddr(),
            'agent' => $this->server->userAgent()
        );

        if (empty($this->admin)) {
            return $submitted;
        }

        // Convert decimal prices from inputs in admin mode
        $submitted['total'] = $this->price->amount($submitted['total'], $submitted['currency']);

        if (empty($submitted['data']['components'])) {
            return $submitted;
        }

        $this->prepareSubmittedOrderComponentsCheckout($submitted);
        return $submitted;
    }
12640
function update_status() {
    global $order, $db;

    if ( ($this->enabled == true) && ((int)MODULE_PAYMENT_PAYPAL_ZONE > 0) ) {
      $check_flag = false;
      $check_query = $db->Execute("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_PAYMENT_PAYPAL_ZONE . "' and zone_country_id = '" . $order->billing['country']['id'] . "' order by zone_id");
      while (!$check_query->EOF) {
        if ($check_query->fields['zone_id'] < 1) {
          $check_flag = true;
          break;
        } elseif ($check_query->fields['zone_id'] == $order->billing['zone_id']) {
          $check_flag = true;
          break;
        }
        $check_query->MoveNext();
      }

      if ($check_flag == false) {
        $this->enabled = false;
      }
    }
  }
825158
protected function validateOrder()
    {
        $id = $this->getUpdatingId();

        if ($id === false) {
            return null;
        }

        $data = $this->order->get($id);

        if (empty($data)) {
            $this->setErrorUnavailable('update', $this->translation->text('Order'));
            return false;
        }

        $this->setUpdating($data);
        return true;
    }
876755
protected function setFormDataAfterCheckout()
    {
        if (empty($this->data_cart)) {
            return null;
        }

        $this->data_form['cart'] = $this->data_cart;

        $this->setFormDataAddressCheckout();

        if (empty($this->data_form['addresses'])) {
            $this->show_shipping_address_form = true;
        }

        $this->data_form['default_payment_method'] = false;
        $this->data_form['default_shipping_method'] = false;
        $this->data_form['same_payment_address'] = $this->same_payment_address;
        $this->data_form['get_payment_methods'] = $this->isPosted('get_payment_methods');
        $this->data_form['get_shipping_methods'] = $this->isPosted('get_shipping_methods');
        $this->data_form['show_login_form'] = $this->show_login_form;
        $this->data_form['show_payment_address_form'] = $this->show_payment_address_form;
        $this->data_form['show_shipping_address_form'] = $this->show_shipping_address_form;
        $this->data_form['show_payment_methods'] = !$this->data_form['has_dynamic_payment_methods'];
        $this->data_form['show_shipping_methods'] = !$this->data_form['has_dynamic_shipping_methods'];

        $submitted = array('order' => $this->getSubmitted());

        $this->data_form['context_templates'] = array(
            'payment' => $this->getPaymentMethodTemplate('context', $submitted['order'], $this->payment),
            'shipping' => $this->getShippingMethodTemplate('context', $submitted['order'], $this->shipping),
        );

        $this->data_form = gplcart_array_merge($this->data_form, $submitted);

        $this->setFormDataRequestServicesCheckout('payment');
        $this->setFormDataRequestServicesCheckout('shipping');
        $this->setFormDataCalculatedCheckout();
        $this->setFormDataPanesCheckout();
    }
518051
public function isSuccessful()
    {
        $isHttpSuccess = parent::isSuccessful();
        $isPurchaseSuccess = false;

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

        return ($isHttpSuccess && $isPurchaseSuccess);
    }
1230937
public function getAmazonOrderReferenceId()
    {
        $paymentHandler = $this->GetPaymentHandler();
        if (false === ($paymentHandler instanceof AmazonPaymentHandler)) {
            throw new \InvalidArgumentException('order was not paid with amazon payment');
        }

        /** @var $paymentHandler AmazonPaymentHandler */

        return $paymentHandler->getAmazonOrderReferenceId();
    }
1123581
public function getOrderTotalAmount(){
        if (isset($this->data['OrderTotal']) && isset($this->data['OrderTotal']['Amount'])){
            return $this->data['OrderTotal']['Amount'];
        } else {
            return false;
        }
    }
1186866
protected function _getPaymentId()
    {
        /** @var OxpsPaymorrowOxBasket|oxBasket $this */

        $sId = (string) $this->getPaymentId();

        if ( !empty( $sId ) ) {
            $sId = $this->_toUtf( $sId );
        } else {
            $sId = 'PaymentId';
        }

        return $sId;
    }
846804
protected function checkRequest()
    {
        if ('prod' === $this->getKernel()->getEnvironment()) {
            throw new \RuntimeException('Debug Payment is not authorized in production environment.');
        }

        $request = $this->getCurrentRequest();
        $reference = $request->get('reference');

        $order = $this->getOrderManager()->findOneBy(['reference' => $reference]);

        if (!$order) {
            throw new NotFoundHttpException(sprintf('Order with reference "%s" not found.', $reference));
        }

        if ($request->get('check') !== $this->getDebugPayment()->generateUrlCheck($order)) {
            throw new InvalidTransactionException($reference);
        }

        return $order;
    }