Model/Action/OrderCaptureAction.php
protected function reauthorize()
    {
        $order = $this->getOrder();

        if ($order->getCapturedAmount() > 0) {
            $handler = $this->getReauthorizeHandler();
            try {
                $response = $handler->getPayPalResponse();

                $payment = oxNew(\OxidEsales\PayPalModule\Model\OrderPayment::class);
                $payment->setDate($this->getDate());
                $payment->setTransactionId($response->getAuthorizationId());
                $payment->setCorrelationId($response->getCorrelationId());
                $payment->setAction('re-authorization');
                $payment->setStatus($response->getPaymentStatus());

                $order->getPaymentList()->addPayment($payment);
            } catch (\OxidEsales\PayPalModule\Core\Exception\PayPalResponseException $e) {
                // Ignore PayPal response exceptions
            }
        }
    }
protected function reauthorize()
    {
        $order = $this->getOrder();

        if ($order->getCapturedAmount() > 0) {
            $handler = $this->getReauthorizeHandler();
            try {
                $response = $handler->getPayPalResponse();

                $payment = oxNew(\OxidEsales\PayPalModule\Model\OrderPayment::class);
                $payment->setDate($this->getDate());
                $payment->setTransactionId($response->getAuthorizationId());
                $payment->setCorrelationId($response->getCorrelationId());
                $payment->setAction('re-authorization');
                $payment->setStatus($response->getPaymentStatus());

                $order->getPaymentList()->addPayment($payment);
            } catch (\OxidEsales\PayPalModule\Core\Exception\PayPalResponseException $e) {
                // Ignore PayPal response exceptions
            }
        }
    }
protected function reauthorize ( ) { $ order = $ this -> getOrder ( ) ; if ( $ order -> getCapturedAmount ( ) > 0 ) { $ handler = $ this -> getReauthorizeHandler ( ) ; try { $ response = $ handler -> getPayPalResponse ( ) ; $ payment = oxNew ( \ OxidEsales \ PayPalModule \ Model \ OrderPayment :: class ) ; $ payment -> setDate ( $ this -> getDate ( ) ) ; $ payment -> setTransactionId ( $ response -> getAuthorizationId ( ) ) ; $ payment -> setCorrelationId ( $ response -> getCorrelationId ( ) ) ; $ payment -> setAction ( 're-authorization' ) ; $ payment -> setStatus ( $ response -> getPaymentStatus ( ) ) ; $ order -> getPaymentList ( ) -> addPayment ( $ payment ) ; } catch ( \ OxidEsales \ PayPalModule \ Core \ Exception \ PayPalResponseException $ e ) { // Ignore PayPal response exceptions } } }
Reauthorizes payment if order was captured at least once.
Reauthorizes payment if order was captured at least once .