protected function cancelSubscription($subscriptionId)
    {
        $subscription = $this->getSubscriptionById($subscriptionId);

        if ($subscription && (! $subscription->cancelled() || $subscription->onGracePeriod())) {
            $subscription->markAsCancelled();
        }

        return new Response('Webhook Handled', 200);
    }
protected function cancelSubscription($subscriptionId)
    {
        $subscription = $this->getSubscriptionById($subscriptionId);

        if ($subscription && (! $subscription->cancelled() || $subscription->onGracePeriod())) {
            $subscription->markAsCancelled();
        }

        return new Response('Webhook Handled', 200);
    }
protected function cancelSubscription ( $ subscriptionId ) { $ subscription = $ this -> getSubscriptionById ( $ subscriptionId ) ; if ( $ subscription && ( ! $ subscription -> cancelled ( ) || $ subscription -> onGracePeriod ( ) ) ) { $ subscription -> markAsCancelled ( ) ; } return new Response ( 'Webhook Handled' , 200 ) ; }
Handle a subscription cancellation notification from Braintree.

@param  string  $subscriptionId
@return \Symfony\Component\HttpFoundation\Response
Handle a subscription cancellation notification from Braintree .