payment added
This commit is contained in:
@@ -6,7 +6,8 @@ from app.api.helpers.response_helper import ResponseHelper
|
||||
from app.api.schemas.user import UserSchema
|
||||
from app.api.schemas.subscription_session import SubscriptionSession
|
||||
from marshmallow import ValidationError
|
||||
from app.models import Members, MembersProducts, SubscriptionOptions, SubscriptionOptionsItems, PaymentsSession
|
||||
from app.models import Members, MembersProducts, SubscriptionOptions, SubscriptionOptionsItems, PaymentsSession, \
|
||||
Payments
|
||||
from app.extensions import db
|
||||
from app.api.integrations import StripeIntegration
|
||||
import json
|
||||
@@ -259,8 +260,13 @@ class SubscriptionsService(BaseService):
|
||||
"payment_uid": currentPaymentsession.uid,
|
||||
"member_id": currentPaymentsession.member_id,
|
||||
"option_name": currentPaymentsession.option_name,
|
||||
"amount": amount_subtotal,
|
||||
"option_type": "MAIN",
|
||||
"next_billing_days": 30
|
||||
}
|
||||
logger.info(f"HOOK payment_data ==>>>> {payment_data}")
|
||||
paymentAddResult = Payments.add_payment(payment_data.member_id, payment_data.payment_uid, payment_data.option_name,
|
||||
payment_data.amount, payment_data.option_type, payment_data.next_billing_days)
|
||||
|
||||
# Simulate processing
|
||||
response_data = {
|
||||
|
||||
Reference in New Issue
Block a user