public function cancelPurchase( DirectDebit\Purchase $purchase )
    {
        $purchase->setRequiredFields(array('id','status'));
        $purchase->checkRequiredFields();

        $request = new Request(array(
            'method' => Request::PUT,
            'uri' => $this->prepareURI($this->purchasePath . $this->uriseparator . $purchase->id),
            'body' => $purchase
        ));

        $response = $this->client->processRequest($request);
        return new DirectDebit\Purchase($response);
    }
public function cancelPurchase( DirectDebit\Purchase $purchase )
    {
        $purchase->setRequiredFields(array('id','status'));
        $purchase->checkRequiredFields();

        $request = new Request(array(
            'method' => Request::PUT,
            'uri' => $this->prepareURI($this->purchasePath . $this->uriseparator . $purchase->id),
            'body' => $purchase
        ));

        $response = $this->client->processRequest($request);
        return new DirectDebit\Purchase($response);
    }
public function cancelPurchase ( DirectDebit \ Purchase $ purchase ) { $ purchase -> setRequiredFields ( array ( 'id' , 'status' ) ) ; $ purchase -> checkRequiredFields ( ) ; $ request = new Request ( array ( 'method' => Request :: PUT , 'uri' => $ this -> prepareURI ( $ this -> purchasePath . $ this -> uriseparator . $ purchase -> id ) , 'body' => $ purchase ) ) ; $ response = $ this -> client -> processRequest ( $ request ) ; return new DirectDebit \ Purchase ( $ response ) ; }
Cancel Purchase.

@param \Paysafe\DirectDebit\Purchase $purchase
@return \Paysafe\DirectDebit\Purchase
@throws PaysafeException
Cancel Purchase .