Returns the payment date for the order.

@return string|null
The payment date (yyyy-mm-dd) or null if the order has not been paid yet.
766793
protected function getPaymentDateOrder()
    {
        // Take date of last payment as payment date.
        $paymentDate = null;
        foreach ($this->source->getStatusHistoryCollection() as $statusChange) {
            /** @var \Mage_Sales_Model_Order_Status_History $statusChange */
            if (!$paymentDate || $this->isPaidStatus($statusChange->getStatus())) {
                $createdAt = substr($statusChange->getCreatedAt(), 0, strlen('yyyy-mm-dd'));
                if (!$paymentDate || $createdAt < $paymentDate) {
                    $paymentDate = $createdAt;
                }
            }
        }
        return $paymentDate;
    }
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;
    }
629157
public function getTransactionString()
    {
        return sprintf(
                "Paymentmethod: %s \n| OrderID: %s \n| Status: %s \n| StatusCode: %s \n| PaymentID: %s \n| TransactionID: %s \n| Amount: %s", isset($this->data->paymentMethod) ? $this->data->paymentMethod : "", isset($this->data->orderID) ? $this->data->orderID : "", isset($this->data->status) ? $this->data->status : "", isset($this->data->statusCode) ? $this->data->statusCode : "", isset($this->data->paymentID) ? $this->data->paymentID : "", isset($this->data->transactionID) ? $this->data->transactionID : "", isset($this->data->amount) ? $this->data->amount : ""
        );
    }
568209
public function getPayload()
    {
        $payload = $this->getService('com:subscriptions.domain.payment.payload', array(

           'order_id' => $this->orderId,
           'description' => $this->_package->name,
           'amount' => $this->getItemAmountAfterDiscount(),
           'tax_amount' => $this->getTaxAmount(),
           'payment_method' => $this->getPaymentMethod(),
           'currency' => $this->currency,

        ));

        if ($this->_package->recurring) {
            $payload->setRecurring(1, $this->_package->billingPeriod, AnDomainAttributeDate::getInstance()->getDate(DATE_FORMAT_ISO_EXTENDED));
        }

        return $payload;
    }
1318532
protected function prepareRequestOrderPayment()
    {
        $requestOrderPayment = oxNew(\OxidEsales\PayPalModule\Model\OrderPayment::class);
        $request = $this->getRequest();

        $requestPaymentSetter = $this->getOrderPaymentSetter();
        $requestPaymentSetter->setRequest($request);
        $requestPaymentSetter->setRequestOrderPayment($requestOrderPayment);

        $requestOrderPayment = $requestPaymentSetter->getRequestOrderPayment();

        return $requestOrderPayment;
    }
480273
public function getPaymorrowOxUserPaymentReloaded()
    {
        $sUserPaymentId = $this->oxorder__oxpaymentid->value;

        /** @var oxUserPayment $oUserPayment */
        $oUserPayment = oxNew( 'oxUserPayment' );
        $oUserPayment->load( $sUserPaymentId );

        return $oUserPayment;
    }
1280961
final protected function customerDob() {return dfc($this, function() {return
		!($s = $this->o()->getCustomerDob()) ? null : df_date_from_db($s)
	;});}
412615
public function getPayWithAmazonButton()
    {
        $buttonURL = $this->getValue('payWithAmazonButtonURL', null);
        if (null !== $buttonURL) {
            $buttonURL .= '?sellerId='.urlencode($this->getMerchantId());
        }

        return $buttonURL;
    }
840967
protected function getPayPalPayment()
    {
        $userPayment = null;

        if (($order = $this->getPayPalOrder())) {
            $userPayment = oxNew(\OxidEsales\Eshop\Application\Model\UserPayment::class);
            $userPayment->load($order->oxorder__oxpaymentid->value);
        }

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

        return $statusCalculator;
    }
1205638
public function getPayment()
    {
        if (!$this->isPayPal()) {
            // removing PayPal payment type from session
            $this->getSession()->deleteVariable('oepaypal');
            $this->getSession()->deleteVariable('oepaypal-basketAmount');

            return parent::getPayment();
        }

        if ($this->payment === null) {
            // payment is set ?
            $payment = oxNew(\OxidEsales\Eshop\Application\Model\Payment::class);
            if ($payment->load('oxidpaypal')) {
                $this->payment = $payment;
            }
        }

        return $this->payment;
    }
66788
public function getOrderPaymentListCalculator()
    {
        if (is_null($this->orderPaymentListCalculator)) {
            $orderPaymentListCalculator = oxNew(\OxidEsales\PayPalModule\Model\OrderPaymentListCalculator::class);
            $this->setOrderPaymentListCalculator($orderPaymentListCalculator);
        }

        return $this->orderPaymentListCalculator;
    }
143076
public function GetTotalOrderValue($sStartDate = null, $sEndDate = null)
    {
        $query = "SELECT SUM(value_total) AS ordervalue
                  FROM `shop_order`
                 WHERE `data_extranet_user_id` = '".MySqlLegacySupport::getInstance()->real_escape_string($this->id)."'
                   AND (`shop_order`.`id` IS NULL OR `shop_order`.`canceled` = '0')
               ";
        if (!is_null($sStartDate)) {
            $query .= " AND `datecreated` >= '".MySqlLegacySupport::getInstance()->real_escape_string($sStartDate)."' ";
        }
        if (!is_null($sEndDate)) {
            $query .= " AND `datecreated` <= '".MySqlLegacySupport::getInstance()->real_escape_string($sEndDate)."' ";
        }
        $query .= ' GROUP BY `data_extranet_user_id`';
        $dValue = 0;
        if ($aRow = MySqlLegacySupport::getInstance()->fetch_assoc(MySqlLegacySupport::getInstance()->query($query))) {
            $dValue = $aRow['ordervalue'];
        }

        return $dValue;
    }
67708
protected function validatePaymentOrder()
    {
        $field = 'payment';

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

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

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

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

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

        $method = $this->payment->get($value);

        if (empty($method['status'])) {
            $this->setErrorUnavailable($field, $label);
            return false;
        }

        return true;
    }
841371
public function getDate()
    {
        if (!isset($this->data['date'])) {
            return null;
        }
        try {
        return (class_exists('\Carbon\Carbon')) ?
            new \Carbon\Carbon($this->data['date'], 'GMT') :
            $this->data['date'];
        } catch (\Exception $e) {
            return null;
        }
    }
1332349
protected function getInvoiceDate()
    {
        $date = !empty($this->invoice[Tag::Customer][Tag::Invoice][Tag::IssueDate]) ? $this->invoice[Tag::Customer][Tag::Invoice][Tag::IssueDate] : date(API::DateFormat_Iso);
        return $date;
    }
1221616
public function getPaymentMethodInstance()
    {
        if (is_null($this->_paymentMethodInstance)) {
            $methodCode = $this->getMethodCode();
            if ($this->getMethodCode() == 'adyen_oneclick') {
                $referenceId = $this->getReferenceId();
                $methodInstanceName = $methodCode . "_" . $referenceId;
            } else {
                $methodInstanceName = $methodCode;
            }

            $this->_paymentMethodInstance = Mage::helper('payment')->getMethodInstance($methodInstanceName);

            if (!$this->_paymentMethodInstance) {
                $this->_paymentMethodInstance = Mage::helper('payment')->getMethodInstance($this->getMethodCode());
            }
        }

        if ($this->_paymentMethodInstance) {
            $this->_paymentMethodInstance->setStore($this->getStoreId());
        }

        return $this->_paymentMethodInstance;
    }