public function addPaymentTransaction(PaymentTransaction $paymentTransaction)
    {
        if (!$this->hasPaymentTransaction($paymentTransaction))
        {
            $this->paymentTransactions[] = $paymentTransaction;
        }

        if ($paymentTransaction->getPayment() !== $this)
        {
            $paymentTransaction->setPayment($this);
        }

        return $this;
    }
public function addPaymentTransaction(PaymentTransaction $paymentTransaction)
    {
        if (!$this->hasPaymentTransaction($paymentTransaction))
        {
            $this->paymentTransactions[] = $paymentTransaction;
        }

        if ($paymentTransaction->getPayment() !== $this)
        {
            $paymentTransaction->setPayment($this);
        }

        return $this;
    }
public function addPaymentTransaction ( PaymentTransaction $ paymentTransaction ) { if ( ! $ this -> hasPaymentTransaction ( $ paymentTransaction ) ) { $ this -> paymentTransactions [ ] = $ paymentTransaction ; } if ( $ paymentTransaction -> getPayment ( ) !== $ this ) { $ paymentTransaction -> setPayment ( $ this ) ; } return $ this ; }
Add payment transaction

@param       PaymentTransaction      $paymentTransaction     Payment transaction

@return      self
Add payment transaction