styripe fix
This commit is contained in:
@@ -1,13 +1,15 @@
|
||||
import stripe
|
||||
import json
|
||||
import logging
|
||||
from app.config import settings
|
||||
from app.config import settings, Config
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
stripe.api_key = settings.STRIPE_PRIV_KEY
|
||||
|
||||
class StripeIntegration:
|
||||
STRIPE_SUCCESS_URL = Config.STRIPE_SUCCESS_URL
|
||||
STRIPE_CANCEL_URL= Config.STRIPE_CANCEL_URL
|
||||
|
||||
@staticmethod
|
||||
def create_customer(stripe_customer):
|
||||
@@ -58,8 +60,8 @@ class StripeIntegration:
|
||||
},
|
||||
],
|
||||
mode='subscription',
|
||||
success_url='https://qa-panel.mermsemr.com/subscription-success?session_id={CHECKOUT_SESSION_ID}',
|
||||
cancel_url='https://qa-panel.mermsemr.com/subscription',
|
||||
success_url= StripeIntegration.STRIPE_SUCCESS_URL,
|
||||
cancel_url=StripeIntegration.STRIPE_CANCEL_URL,
|
||||
)
|
||||
return checkout_session
|
||||
except stripe.error.StripeError as e:
|
||||
|
||||
@@ -39,6 +39,9 @@ class Config:
|
||||
# KAFKA_BROKER = 'dev-events.simbrellang.net:9085'
|
||||
KAFKA_BROKER = os.getenv("KAFKA_BROKER", "10.10.10.120:9092")
|
||||
|
||||
STRIPE_SUCCESS_URL = os.environ.get("STRIPE_SUCCESS_URL","https://qa-panel.mermsemr.com/subscription-success?session_id={CHECKOUT_SESSION_ID}")
|
||||
STRIPE_CANCEL_URL = os.environ.get("STRIPE_CANCEL_URL","https://qa-panel.mermsemr.com/subscriptio")
|
||||
|
||||
# SIMBRELLA_ENDPOINT_RAC_CHECKS = os.getenv("SIMBRELLA_ENDPOINT_RAC_CHECKS", "RACCheck")
|
||||
VALID_APP_ID = os.getenv("SIMBRELLA_APP_ID", "app1")
|
||||
VALID_API_KEY = os.getenv("SIMBRELLA_API_KEY", "test-api-key-12345")
|
||||
|
||||
Reference in New Issue
Block a user