public function cancel()
    {
        if (!$this->isType(self::CHARGE_ONETIME) && !$this->isType(self::CHARGE_RECURRING)) {
            throw new Exception('Cancel may only be called for single and recurring charges.');
        }

        $this->status = self::STATUS_CANCELLED;
        $this->cancelled_on = Carbon::today()->format('Y-m-d');

        return $this->save();
    }
public function cancel()
    {
        if (!$this->isType(self::CHARGE_ONETIME) && !$this->isType(self::CHARGE_RECURRING)) {
            throw new Exception('Cancel may only be called for single and recurring charges.');
        }

        $this->status = self::STATUS_CANCELLED;
        $this->cancelled_on = Carbon::today()->format('Y-m-d');

        return $this->save();
    }
public function cancel ( ) { if ( ! $ this -> isType ( self :: CHARGE_ONETIME ) && ! $ this -> isType ( self :: CHARGE_RECURRING ) ) { throw new Exception ( 'Cancel may only be called for single and recurring charges.' ) ; } $ this -> status = self :: STATUS_CANCELLED ; $ this -> cancelled_on = Carbon :: today ( ) -> format ( 'Y-m-d' ) ; return $ this -> save ( ) ; }
Cancels this charge.

@return self
Cancels this charge .