protected function updatePaymentTransactionOnError(PaymentTransaction $paymentTransaction, Response $response)
    {
        if ($response->isDeclined())
        {
            $paymentTransaction->setStatus($response->getStatus());
        }
        else
        {
            $paymentTransaction->setStatus(PaymentTransaction::STATUS_ERROR);
        }

        $paymentTransaction->addError($response->getError());

        $this->setPaynetId($paymentTransaction, $response);
    }
protected function updatePaymentTransactionOnError(PaymentTransaction $paymentTransaction, Response $response)
    {
        if ($response->isDeclined())
        {
            $paymentTransaction->setStatus($response->getStatus());
        }
        else
        {
            $paymentTransaction->setStatus(PaymentTransaction::STATUS_ERROR);
        }

        $paymentTransaction->addError($response->getError());

        $this->setPaynetId($paymentTransaction, $response);
    }
protected function updatePaymentTransactionOnError ( PaymentTransaction $ paymentTransaction , Response $ response ) { if ( $ response -> isDeclined ( ) ) { $ paymentTransaction -> setStatus ( $ response -> getStatus ( ) ) ; } else { $ paymentTransaction -> setStatus ( PaymentTransaction :: STATUS_ERROR ) ; } $ paymentTransaction -> addError ( $ response -> getError ( ) ) ; $ this -> setPaynetId ( $ paymentTransaction , $ response ) ; }
Updates payment transaction by query response data
if payment transaction is not processing or approved

@param       PaymentTransaction      $paymentTransaction     Payment transaction for updating
@param       Response                $response               Response for payment transaction updating
Updates payment transaction by query response data if payment transaction is not processing or approved