src/Factory/RequestBase.php
public function setPayment($iPaymentId)
    {
        //  Validate
        $oPayment = $this->oPaymentModel->getById(
            $iPaymentId,
            ['expand' => ['invoice']]
        );

        if (empty($oPayment)) {
            throw new RequestException('Invalid payment ID.');
        }

        $this->oPayment = $oPayment;
        return $this;
    }
public function setPayment($iPaymentId)
    {
        //  Validate
        $oPayment = $this->oPaymentModel->getById(
            $iPaymentId,
            ['expand' => ['invoice']]
        );

        if (empty($oPayment)) {
            throw new RequestException('Invalid payment ID.');
        }

        $this->oPayment = $oPayment;
        return $this;
    }
public function setPayment ( $ iPaymentId ) { //  Validate $ oPayment = $ this -> oPaymentModel -> getById ( $ iPaymentId , [ 'expand' => [ 'invoice' ] ] ) ; if ( empty ( $ oPayment ) ) { throw new RequestException ( 'Invalid payment ID.' ) ; } $ this -> oPayment = $ oPayment ; return $ this ; }
Set the payment object

@param integer $iPaymentId The payment to use for the request

@return $this
@throws RequestException
Set the payment object