public function actionHandleWebhook()
    {
        $payload = json_decode(Yii::$app->request->getRawBody(), true);

        if (!$this->eventExistsOnStripe($payload['id'])) {
            return;
        }

        $method = 'handle' . Inflector::camelize(str_replace('.', '_', $payload['type']));

        if (method_exists($this, $method)) {
            return $this->{$method}($payload);
        }

        return $this->missingMethod();
    }
public function actionHandleWebhook()
    {
        $payload = json_decode(Yii::$app->request->getRawBody(), true);

        if (!$this->eventExistsOnStripe($payload['id'])) {
            return;
        }

        $method = 'handle' . Inflector::camelize(str_replace('.', '_', $payload['type']));

        if (method_exists($this, $method)) {
            return $this->{$method}($payload);
        }

        return $this->missingMethod();
    }
public function actionHandleWebhook ( ) { $ payload = json_decode ( Yii :: $ app -> request -> getRawBody ( ) , true ) ; if ( ! $ this -> eventExistsOnStripe ( $ payload [ 'id' ] ) ) { return ; } $ method = 'handle' . Inflector :: camelize ( str_replace ( '.' , '_' , $ payload [ 'type' ] ) ) ; if ( method_exists ( $ this , $ method ) ) { return $ this -> { $ method } ( $ payload ) ; } return $ this -> missingMethod ( ) ; }
Processing Stripe's callback and making membership updates according to payment data

@return void|Response
Processing Stripe s callback and making membership updates according to payment data