Model/Order.php
protected function _setOrderStatus($status)
    {
        $paymentTypeObject = $this->getPaymentType();
        $paymentType = $paymentTypeObject ? $paymentTypeObject->getFieldData('oxpaymentsid') : null;
        if ($paymentType != 'oxidpaypal' || $status != self::OEPAYPAL_TRANSACTION_STATUS_OK) {
            parent::_setOrderStatus($status);
        }
    }
protected function _setOrderStatus($status)
    {
        $paymentTypeObject = $this->getPaymentType();
        $paymentType = $paymentTypeObject ? $paymentTypeObject->getFieldData('oxpaymentsid') : null;
        if ($paymentType != 'oxidpaypal' || $status != self::OEPAYPAL_TRANSACTION_STATUS_OK) {
            parent::_setOrderStatus($status);
        }
    }
protected function _setOrderStatus ( $ status ) { $ paymentTypeObject = $ this -> getPaymentType ( ) ; $ paymentType = $ paymentTypeObject ? $ paymentTypeObject -> getFieldData ( 'oxpaymentsid' ) : null ; if ( $ paymentType != 'oxidpaypal' || $ status != self :: OEPAYPAL_TRANSACTION_STATUS_OK ) { parent :: _setOrderStatus ( $ status ) ; } }
Paypal specific status checking.

If status comes as OK, lets check real paypal payment state,
and if really ok, so lets set it, otherwise dont change status.

@param string $status order transaction status
Paypal specific status checking .