public function setPayment(Payment $payment)
    {
        $this->payment = $payment;

        if (!$payment->hasPaymentTransaction($this))
        {
            $payment->addPaymentTransaction($this);
        }

        return $this;
    }
public function setPayment(Payment $payment)
    {
        $this->payment = $payment;

        if (!$payment->hasPaymentTransaction($this))
        {
            $payment->addPaymentTransaction($this);
        }

        return $this;
    }
public function setPayment ( Payment $ payment ) { $ this -> payment = $ payment ; if ( ! $ payment -> hasPaymentTransaction ( $ this ) ) { $ payment -> addPaymentTransaction ( $ this ) ; } return $ this ; }
Set payment transaction payment

@param       Payment         $payment        Payment

@return      self
Set payment transaction payment