payment_data
This commit is contained in:
@@ -12,7 +12,6 @@ from app.api.integrations import StripeIntegration
|
||||
import json
|
||||
|
||||
|
||||
|
||||
class SubscriptionsService(BaseService):
|
||||
# def get_all_subscriptions(cls, product_id=None, member_id=None, page=1, limit=20):
|
||||
@staticmethod
|
||||
@@ -191,7 +190,6 @@ class SubscriptionsService(BaseService):
|
||||
# product_subscription_external_url = memberSubscription.external_url
|
||||
# product_subscription_internal_url = memberSubscription.internal_url
|
||||
|
||||
|
||||
# "banner": "banner.jpg",
|
||||
# myproduct_data = {
|
||||
# "myproudct": {
|
||||
@@ -238,8 +236,6 @@ class SubscriptionsService(BaseService):
|
||||
db.session.rollback()
|
||||
return ResponseHelper.internal_server_error()
|
||||
|
||||
|
||||
|
||||
@staticmethod
|
||||
def subscription_webhook_start(data):
|
||||
try:
|
||||
@@ -258,8 +254,13 @@ class SubscriptionsService(BaseService):
|
||||
currentPaymentsession = PaymentsSession.get_payment_session_with_session_id(data_id)
|
||||
logger.info(f"HOOK currentPaymentsession ==>>>> {currentPaymentsession}")
|
||||
|
||||
|
||||
|
||||
if currentPaymentsession:
|
||||
payment_data = {
|
||||
"payment_uid": currentPaymentsession.uid,
|
||||
"member_id": currentPaymentsession.member_id,
|
||||
"option_name": currentPaymentsession.option_name,
|
||||
}
|
||||
logger.info(f"HOOK payment_data ==>>>> {payment_data}")
|
||||
|
||||
# Simulate processing
|
||||
response_data = {
|
||||
@@ -285,5 +286,3 @@ class SubscriptionsService(BaseService):
|
||||
logger.error(f"An error occurred: {str(e)}", exc_info=True)
|
||||
db.session.rollback()
|
||||
return ResponseHelper.internal_server_error()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user