src/Resource/Payment.php
public function execute()
    {
        if ($this->order !== null) {
            $path = sprintf('/%s/%s/%s/%s', MoipResource::VERSION, Orders::PATH, $this->order->getId(), self::PATH);
        } else {
            $path = sprintf('/%s/%s/%s/%s', MoipResource::VERSION, Multiorders::PATH, $this->multiorder->getId(), self::MULTI_PAYMENTS_PATH);
        }

        $response = $this->httpRequest($path, Requests::POST, $this);

        return $this->populate($response);
    }
public function execute()
    {
        if ($this->order !== null) {
            $path = sprintf('/%s/%s/%s/%s', MoipResource::VERSION, Orders::PATH, $this->order->getId(), self::PATH);
        } else {
            $path = sprintf('/%s/%s/%s/%s', MoipResource::VERSION, Multiorders::PATH, $this->multiorder->getId(), self::MULTI_PAYMENTS_PATH);
        }

        $response = $this->httpRequest($path, Requests::POST, $this);

        return $this->populate($response);
    }
public function execute ( ) { if ( $ this -> order !== null ) { $ path = sprintf ( '/%s/%s/%s/%s' , MoipResource :: VERSION , Orders :: PATH , $ this -> order -> getId ( ) , self :: PATH ) ; } else { $ path = sprintf ( '/%s/%s/%s/%s' , MoipResource :: VERSION , Multiorders :: PATH , $ this -> multiorder -> getId ( ) , self :: MULTI_PAYMENTS_PATH ) ; } $ response = $ this -> httpRequest ( $ path , Requests :: POST , $ this ) ; return $ this -> populate ( $ response ) ; }
Create a new payment in api MoIP.

@return $this
Create a new payment in api MoIP .