Model/PayPalOrder.php
public function setPaymentStatus($status, \OxidEsales\Eshop\Application\Model\Order $order = null)
    {
        $this->setValue('oepaypal_paymentstatus', $status);

        // if payment completed, set order paid
        if ($status == \OxidEsales\PayPalModule\Model\PayPalOrder::PAYPAL_ORDER_STATE_COMPLETED) {
            if (is_null($order)) {
                $order = oxNew(\OxidEsales\Eshop\Application\Model\Order::class);
                $order->load($this->getOrderId());
            }
            $order->markOrderPaid();
        }
    }
public function setPaymentStatus($status, \OxidEsales\Eshop\Application\Model\Order $order = null)
    {
        $this->setValue('oepaypal_paymentstatus', $status);

        // if payment completed, set order paid
        if ($status == \OxidEsales\PayPalModule\Model\PayPalOrder::PAYPAL_ORDER_STATE_COMPLETED) {
            if (is_null($order)) {
                $order = oxNew(\OxidEsales\Eshop\Application\Model\Order::class);
                $order->load($this->getOrderId());
            }
            $order->markOrderPaid();
        }
    }
public function setPaymentStatus ( $ status , \ OxidEsales \ Eshop \ Application \ Model \ Order $ order = null ) { $ this -> setValue ( 'oepaypal_paymentstatus' , $ status ) ; // if payment completed, set order paid if ( $ status == \ OxidEsales \ PayPalModule \ Model \ PayPalOrder :: PAYPAL_ORDER_STATE_COMPLETED ) { if ( is_null ( $ order ) ) { $ order = oxNew ( \ OxidEsales \ Eshop \ Application \ Model \ Order :: class ) ; $ order -> load ( $ this -> getOrderId ( ) ) ; } $ order -> markOrderPaid ( ) ; } }
Set payment status.

@param string                                    $status
@param \OxidEsales\Eshop\Application\Model\Order $order Shop order object
Set payment status .