public function cancelSale($paymentId, $amount = null)
    {
        $updateSaleRequest = new UpdateSaleRequest('void', $this->merchant, $this->environment);

        $updateSaleRequest->setAmount($amount);

        return $updateSaleRequest->execute($paymentId);
    }
public function cancelSale($paymentId, $amount = null)
    {
        $updateSaleRequest = new UpdateSaleRequest('void', $this->merchant, $this->environment);

        $updateSaleRequest->setAmount($amount);

        return $updateSaleRequest->execute($paymentId);
    }
public function cancelSale ( $ paymentId , $ amount = null ) { $ updateSaleRequest = new UpdateSaleRequest ( 'void' , $ this -> merchant , $ this -> environment ) ; $ updateSaleRequest -> setAmount ( $ amount ) ; return $ updateSaleRequest -> execute ( $ paymentId ) ; }
Cancel a Sale on Cielo by paymentId and speficying the amount

@param string  $paymentId
The paymentId to be queried
@param integer $amount
Order value in cents

@return Sale The Sale with authorization, tid, etc. returned by Cielo.

@throws \Cielo\API30\Ecommerce\Request\CieloRequestException if anything gets wrong.

@see <a href=
"https://developercielo.github.io/Webservice-3.0/english.html#error-codes">Error
Codes</a>
Cancel a Sale on Cielo by paymentId and speficying the amount