addes stipe starter
This commit is contained in:
@@ -1,2 +1,3 @@
|
||||
from .simbrella import SimbrellaIntegration
|
||||
from .kafka import KafkaIntegration
|
||||
from .kafka import KafkaIntegration
|
||||
from .merms_stripe import StripeIntegration
|
||||
@@ -9,13 +9,18 @@ stripe.api_key = settings.STRIPE_PRIV_KEY
|
||||
|
||||
class StripeIntegration:
|
||||
|
||||
def create_customer(self, data):
|
||||
@staticmethod
|
||||
def create_customer(stripe_customer):
|
||||
logger.info(f"Inside Stripe_Customer ===== : {stripe_customer}")
|
||||
customer = stripe.Customer.create(
|
||||
email="customer@example.com",
|
||||
description="Customer for subscription",
|
||||
payment_method="pm_card_visa", # Replace with a valid payment method ID or attach one later
|
||||
email= stripe_customer["email"],
|
||||
name=stripe_customer["name"],
|
||||
payment_method="pm_card_visa",
|
||||
description="Customer for Merms Subscription",
|
||||
invoice_settings={"default_payment_method": "pm_card_visa"},
|
||||
)
|
||||
# payment_method="pm_card_visa", # Replace with a valid payment method ID or attach one later
|
||||
return customer
|
||||
|
||||
def create_product(self, data):
|
||||
# Example of creating a Product and Price
|
||||
|
||||
Reference in New Issue
Block a user