68 lines
2.7 KiB
Python
68 lines
2.7 KiB
Python
from flask import session, jsonify
|
|
|
|
from app.api.schemas.user_update import UserUpdateSchema
|
|
# from app.models.loan import Loan
|
|
from app.utils.logger import logger
|
|
from app.api.services.base_service import BaseService
|
|
# from app.api.schemas.eligibility_check import EligibilityCheckSchema
|
|
from marshmallow import ValidationError
|
|
from app.api.enums import TransactionType
|
|
# from app.api.integrations import SimbrellaIntegration
|
|
from app.extensions import db
|
|
from app.models import Members, MembersActions, MembersProfile, Payments, MembersProducts, ProvisionActions
|
|
# from app.api.services.offer_analysis import OfferAnalysis
|
|
from app.api.helpers.response_helper import ResponseHelper
|
|
from werkzeug.security import generate_password_hash, check_password_hash
|
|
from app.api.schemas.user import UserSchema
|
|
from app.api.schemas.start_profile import StartProfileSchema
|
|
from app.api.schemas.profile_links import ProfileLinksSchema
|
|
from app.api.integrations import StripeIntegration
|
|
|
|
|
|
from flask_mail import Mail, Message
|
|
import smtplib
|
|
from email.mime.text import MIMEText
|
|
from email.mime.multipart import MIMEMultipart
|
|
|
|
import datetime
|
|
import jwt
|
|
import random
|
|
from app.config import Config
|
|
|
|
|
|
import smtplib, ssl
|
|
from email.message import EmailMessage
|
|
|
|
class AutomationCalls(BaseService):
|
|
JWT_SECRET_KEY = Config.JWT_SECRET_KEY
|
|
|
|
SEND_EMAIL_FROM = Config.SEND_EMAIL_FROM
|
|
SEND_EMAIL_PASS = Config.SEND_EMAIL_PASS
|
|
THIS_SITE_URL = Config.THIS_SITE_URL
|
|
|
|
@staticmethod
|
|
def process_stripe_payment_refresh(data):
|
|
|
|
stripe_transactions = StripeIntegration.transction_hx()
|
|
print(stripe_transactions)
|
|
logger.info(f"Return Stripe_Transaction Hx ===== : {stripe_transactions}")
|
|
|
|
bar_data = {
|
|
"last_update": datetime.datetime.utcnow(),
|
|
"top_bar": [
|
|
{"id": "1", "description": "Contacts", "last_update": "10-10-2010 11:00 AM",
|
|
"value": random.randint(0, 10), "data_span": 'Last 2 months', "link": "#", "extra_style": ''},
|
|
{"id": "2", "description": "Site Traffic", "last_update": "10-10-2010 11:30 AM",
|
|
"value": random.randint(0, 10), "data_span": 'Past 12 hours', "link": "#", "extra_style": ''},
|
|
{"id": "3", "description": "Appointments", "last_update": "10-12-2010 11:30 AM",
|
|
"value": random.randint(0, 10), "data_span": 'Last 14 days', "link": "#", "extra_style": ''},
|
|
{"id": "4", "description": "Upgrade Account", "last_update": "10-12-2010 11:30 AM",
|
|
"value": "Free Trial", "data_span": 'End: 10/10/2025', "link": "/subscription",
|
|
"extra_style": " billing "}
|
|
]
|
|
}
|
|
return ResponseHelper.success(data=bar_data)
|
|
|
|
|
|
|