(self, form_data)
return customer['id']
Create Subscription Method
Create Subscription Method
Create Subscription Method
def create_subscription(self, form_data):
        ''' Create Subscription Method '''
        stripe.api_key = self.config['STRIPE_PRIVATE_KEY']
        customer = stripe.Customer.create(source=form_data['stripe_token'],
                                          email=self.user.email, plan=form_data['plan'],
                                          quantity=self.user.subplans)
        return customer['id']
def create_subscription ( self , form_data ) : stripe . api_key = self . config [ 'STRIPE_PRIVATE_KEY' ] customer = stripe . Customer . create ( source = form_data [ 'stripe_token' ] , email = self . user . email , plan = form_data [ 'plan' ] , quantity = self . user . subplans ) return customer [ 'id' ]