Model/Order.php
protected function isPayPalPaymentValid($user, $basketPrice, $shippingId)
    {
        $valid = true;

        $payPalPayment = oxNew(\OxidEsales\Eshop\Application\Model\Payment::class);
        $payPalPayment->load('oxidpaypal');
        if (!$payPalPayment->isValidPayment(null, null, $user, $basketPrice, $shippingId)) {
            $valid = $this->isEmptyPaymentValid($user, $basketPrice, $shippingId);
        }

        return $valid;
    }
protected function isPayPalPaymentValid($user, $basketPrice, $shippingId)
    {
        $valid = true;

        $payPalPayment = oxNew(\OxidEsales\Eshop\Application\Model\Payment::class);
        $payPalPayment->load('oxidpaypal');
        if (!$payPalPayment->isValidPayment(null, null, $user, $basketPrice, $shippingId)) {
            $valid = $this->isEmptyPaymentValid($user, $basketPrice, $shippingId);
        }

        return $valid;
    }
protected function isPayPalPaymentValid ( $ user , $ basketPrice , $ shippingId ) { $ valid = true ; $ payPalPayment = oxNew ( \ OxidEsales \ Eshop \ Application \ Model \ Payment :: class ) ; $ payPalPayment -> load ( 'oxidpaypal' ) ; if ( ! $ payPalPayment -> isValidPayment ( null , null , $ user , $ basketPrice , $ shippingId ) ) { $ valid = $ this -> isEmptyPaymentValid ( $ user , $ basketPrice , $ shippingId ) ; } return $ valid ; }
Checks whether PayPal payment is available.

@param object $user
@param double $basketPrice
@param string $shippingId

@return bool
Checks whether PayPal payment is available .