src/ClearSaleID/Service/Analysis.php
public function checkOrderStatus( $orderId )
    {
        $this->packageStatusResponse = $this->integration->checkOrderStatus( $orderId );

        if (!$this->packageStatusResponse->getOrder()) {
            // no order returned
            return self::ORDER_STATUS_NO_ORDER_RETURNED;
        }

        if ($this->packageStatusResponse->getOrder()->isApproved()) {
            return self::ORDER_STATUS_APPROVED;
        }

        if ($this->packageStatusResponse->getOrder()->isRejected()) {
            return self::ORDER_STATUS_REJECTED;
        }

        // invalid order status
        return self::ORDER_STATUS_INVALID;
    }
public function checkOrderStatus( $orderId )
    {
        $this->packageStatusResponse = $this->integration->checkOrderStatus( $orderId );

        if (!$this->packageStatusResponse->getOrder()) {
            // no order returned
            return self::ORDER_STATUS_NO_ORDER_RETURNED;
        }

        if ($this->packageStatusResponse->getOrder()->isApproved()) {
            return self::ORDER_STATUS_APPROVED;
        }

        if ($this->packageStatusResponse->getOrder()->isRejected()) {
            return self::ORDER_STATUS_REJECTED;
        }

        // invalid order status
        return self::ORDER_STATUS_INVALID;
    }
public function checkOrderStatus ( $ orderId ) { $ this -> packageStatusResponse = $ this -> integration -> checkOrderStatus ( $ orderId ) ; if ( ! $ this -> packageStatusResponse -> getOrder ( ) ) { // no order returned return self :: ORDER_STATUS_NO_ORDER_RETURNED ; } if ( $ this -> packageStatusResponse -> getOrder ( ) -> isApproved ( ) ) { return self :: ORDER_STATUS_APPROVED ; } if ( $ this -> packageStatusResponse -> getOrder ( ) -> isRejected ( ) ) { return self :: ORDER_STATUS_REJECTED ; } // invalid order status return self :: ORDER_STATUS_INVALID ; }
Retorna o status de aprovação de um pedido

@param  string $orderId

@return string
@throws \RodrigoPedra\ClearSaleID\Exception\UnexpectedErrorException
Retorna o status de aprovação de um pedido