addes stipe starter

This commit is contained in:
CHIEFSOFT\ameye
2025-08-10 19:57:01 -04:00
parent ebffcde08c
commit 4fda3ccfe9
6 changed files with 41 additions and 14 deletions
+2 -1
View File
@@ -1,2 +1,3 @@
from .simbrella import SimbrellaIntegration
from .kafka import KafkaIntegration
from .kafka import KafkaIntegration
from .merms_stripe import StripeIntegration
+9 -4
View File
@@ -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