20/03/23 - 19h45
parent
3e2074c9f8
commit
c4070f0977
|
@ -1,10 +1,15 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="1122d9e2-679f-46d6-8c4f-97e9ae4041b5" name="Changes" comment="18/03/23 - 21h45">
|
||||
<list default="true" id="1122d9e2-679f-46d6-8c4f-97e9ae4041b5" name="Changes" comment="19/03/23 - 19h45">
|
||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/GlobalVariable.py" beforeDir="false" afterPath="$PROJECT_DIR$/GlobalVariable.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Log/log_file.log" beforeDir="false" afterPath="$PROJECT_DIR$/Log/log_file.log" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/ela_factures_mgt.py" beforeDir="false" afterPath="$PROJECT_DIR$/ela_factures_mgt.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/email_mgt.py" beforeDir="false" afterPath="$PROJECT_DIR$/email_mgt.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/lms_chamilo/mysy_lms.py" beforeDir="false" afterPath="$PROJECT_DIR$/lms_chamilo/mysy_lms.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/main.py" beforeDir="false" afterPath="$PROJECT_DIR$/main.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/partners.py" beforeDir="false" afterPath="$PROJECT_DIR$/partners.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/strype_payement.py" beforeDir="false" afterPath="$PROJECT_DIR$/strype_payement.py" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
|
@ -357,7 +362,14 @@
|
|||
<option name="project" value="LOCAL" />
|
||||
<updated>1679173109666</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="42" />
|
||||
<task id="LOCAL-00042" summary="19/03/23 - 19h45">
|
||||
<created>1679251524150</created>
|
||||
<option name="number" value="00042" />
|
||||
<option name="presentableId" value="LOCAL-00042" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1679251524150</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="43" />
|
||||
<servers />
|
||||
</component>
|
||||
<component name="Vcs.Log.Tabs.Properties">
|
||||
|
@ -372,7 +384,6 @@
|
|||
</option>
|
||||
</component>
|
||||
<component name="VcsManagerConfiguration">
|
||||
<MESSAGE value="13/01/22 à 20h" />
|
||||
<MESSAGE value="15/01/2023 - 22h" />
|
||||
<MESSAGE value="18/01/23 - 21h" />
|
||||
<MESSAGE value="19/01/23 - 20h" />
|
||||
|
@ -397,6 +408,7 @@
|
|||
<MESSAGE value="06/03/23 - 17h45" />
|
||||
<MESSAGE value="16/03/23 - 17h45" />
|
||||
<MESSAGE value="18/03/23 - 21h45" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="18/03/23 - 21h45" />
|
||||
<MESSAGE value="19/03/23 - 19h45" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="19/03/23 - 19h45" />
|
||||
</component>
|
||||
</project>
|
2421
Log/log_file.log
2421
Log/log_file.log
File diff suppressed because one or more lines are too long
|
@ -767,6 +767,8 @@ def createOrder(diction):
|
|||
tmp_diction = {"partnaire_recid":str(user_recid), "new_pack_name":str(mypack)}
|
||||
|
||||
class_mgt.UpdataPartnerRankingClass(tmp_diction)
|
||||
|
||||
|
||||
return True, "la commande été correctement créee", str(new_data['order_id'])
|
||||
else:
|
||||
mycommon.myprint(
|
||||
|
|
57
email_mgt.py
57
email_mgt.py
|
@ -1995,6 +1995,63 @@ def EmailStopAbonnement( partners_email, partners_pack_service, partners_date_ar
|
|||
return False, " Impossible d'envoyer l'email de notification "
|
||||
|
||||
|
||||
"""
|
||||
Cette fonction notifier à un partenaire la modification de son abonnement avec de nouvelle quantité
|
||||
"""
|
||||
def EmailChangeAbonnementQty( partners_email, partners_pack_service, partners_date_arret, partners_nom, old_qty, new_qty ):
|
||||
try:
|
||||
tomorrow = datetime.date.today() + datetime.timedelta(days=1)
|
||||
tomorrow_day = tomorrow.strftime("%A")
|
||||
|
||||
|
||||
|
||||
smtpserver = smtplib.SMTP(MYSY_GV.O365_SMTP_COUNT_smtpsrv, MYSY_GV.O365_SMTP_COUNT_port)
|
||||
|
||||
# msg = MIMEMultipart("alternative")
|
||||
msg = EmailMessage()
|
||||
|
||||
# JINJA2
|
||||
templateLoader = jinja2.FileSystemLoader(searchpath="./")
|
||||
templateEnv = jinja2.Environment(loader=templateLoader)
|
||||
TEMPLATE_FILE = "Template/MySy_Update_Qty_Abonnement_tpl.html"
|
||||
template = templateEnv.get_template(TEMPLATE_FILE)
|
||||
# This data can come from database query
|
||||
body = {
|
||||
"params":{"user_name": str(partners_nom),
|
||||
"packs": str(partners_pack_service),
|
||||
"end_date_abonnement": str(partners_date_arret),
|
||||
"email": str(partners_email),
|
||||
"old_qty": str(old_qty),
|
||||
"new_qty": str(new_qty),
|
||||
|
||||
},
|
||||
}
|
||||
|
||||
sourceHtml = template.render(params=body["params"])
|
||||
|
||||
msg.set_content(sourceHtml, subtype='html')
|
||||
msg['From'] = MYSY_GV.O365_SMTP_COUNT_From_User
|
||||
|
||||
msg['Bcc'] = 'contact@mysy-training.com'
|
||||
|
||||
msg['Subject'] = "[MySy Training Technology] : Modification de votre abonnement "+str(partners_pack_service)
|
||||
msg['To'] = str(partners_email)
|
||||
|
||||
smtpserver.ehlo()
|
||||
smtpserver.starttls()
|
||||
smtpserver.login(MYSY_GV.O365_SMTP_COUNT_user, MYSY_GV.O365_SMTP_COUNT_password)
|
||||
val = smtpserver.send_message(msg)
|
||||
smtpserver.close()
|
||||
print(" Email envoyé " + str(val))
|
||||
return True
|
||||
|
||||
|
||||
except Exception as e:
|
||||
exc_type, exc_obj, exc_tb = sys.exc_info()
|
||||
mycommon.myprint(str(inspect.stack()[0][3]) + " -" + str(e) + " - ERRORRRR AT Line : " + str(exc_tb.tb_lineno))
|
||||
return False, " Impossible d'envoyer l'email de notification "
|
||||
|
||||
|
||||
"""
|
||||
Cette fonction envoie la notification d'evaluation à un institut de formation
|
||||
"""
|
||||
|
|
|
@ -956,4 +956,105 @@ def Check_MySy_LMS_Account(diction):
|
|||
except Exception as e:
|
||||
exc_type, exc_obj, exc_tb = sys.exc_info()
|
||||
mycommon.myprint(str(inspect.stack()[0][3]) + " -" + str(e) + " - Line : " + str(exc_tb.tb_lineno))
|
||||
return False, " Impossible de créer le compte LMS : Check_MySy_LMS_User "
|
||||
return False, " Impossible de créer le compte LMS : Check_MySy_LMS_User "
|
||||
|
||||
|
||||
"""
|
||||
Cette fonction retourne le nombre de formations actives dans mysy et dans le lms
|
||||
la valeur retournée est de type : true, nb_active_mysy, nb_active_lms, message
|
||||
"""
|
||||
def Get_Active_Ftions_Mysy_and_Lms(diction):
|
||||
try:
|
||||
|
||||
# Verification des champs
|
||||
field_list = ['token', ]
|
||||
|
||||
incom_keys = diction.keys()
|
||||
for val in incom_keys:
|
||||
if val not in field_list:
|
||||
mycommon.myprint(str(inspect.stack()[0][
|
||||
3]) + " Le champ '" + val + "' n'est pas autorisé")
|
||||
return False, False, False, str(inspect.stack()[0][3]) + " Le champ '" + val + "' n'est pas autorisé"
|
||||
|
||||
'''
|
||||
Une fois qu'on a controlé que toutes les clés mise dans l'API sont correcte. etape precedente,
|
||||
On controle que les champs obligatoires sont presents dans la liste
|
||||
'''
|
||||
field_list_obligatoire = ['token', ]
|
||||
|
||||
for val in field_list_obligatoire:
|
||||
if val not in diction:
|
||||
mycommon.myprint(
|
||||
str(inspect.stack()[0][3]) + " - La valeur '" + val + "' n'est pas presente dans liste ")
|
||||
return False, False, False, str(inspect.stack()[0][3]) + " Toutes les informations obligatoire n'ont pas été fournies"
|
||||
|
||||
# recuperation des paramettre
|
||||
my_token = ""
|
||||
if ("token" in diction.keys()):
|
||||
if diction['token']:
|
||||
my_token = diction['token']
|
||||
|
||||
partner_recid = ""
|
||||
# Verification de la validité du token/mail dans le cas des user en mode connecté
|
||||
if (len(str(my_token)) > 0):
|
||||
retval = mycommon.check_partner_token_validity("", my_token)
|
||||
|
||||
if retval is False:
|
||||
mycommon.myprint(str(inspect.stack()[0][3]) + " - Le token n'est pas valide")
|
||||
return False, False, False, str(inspect.stack()[0][3]) + " - Le token n'est pas valide"
|
||||
|
||||
# Recuperation du recid de l'utilisateur
|
||||
partner_recid = mycommon.get_parnter_recid_from_token(my_token)
|
||||
if partner_recid is False:
|
||||
mycommon.myprint(str(inspect.stack()[0][3]) + " - Impossible de recuperer le token du partenaire")
|
||||
return False, False, False, str(inspect.stack()[0][3]) + " - Impossible de recuperer le token du partenaire"
|
||||
|
||||
if (len(str(my_token)) <= 0):
|
||||
mycommon.myprint(str(inspect.stack()[0][3]) + " - Le token est vide")
|
||||
return False, False, False, str(inspect.stack()[0][3]) + " - Le token est vide"
|
||||
|
||||
# Recuperation des données du partenaire
|
||||
local_status, my_partner = mycommon.get_partner_data_from_recid(partner_recid)
|
||||
if (local_status is False):
|
||||
mycommon.myprint(str(inspect.stack()[0][3]) + " - impossible de recuperer les données du partenaire")
|
||||
return False, False, False, " - impossible de recuperer les données du partenaire"
|
||||
|
||||
# print(" ### my_partner = ", str(my_partner))
|
||||
mysy_lms_user_id = ""
|
||||
if ("mysy_lms_user_id" in my_partner.keys()):
|
||||
if my_partner['mysy_lms_user_id']:
|
||||
mysy_lms_user_id = my_partner['mysy_lms_user_id']
|
||||
|
||||
|
||||
|
||||
# recup du nombre de formations actives et publiées dans mysy
|
||||
mysy_count = MYSY_GV.dbname['myclass'].count_documents({'locked':'0', 'valide':'1', 'published':'1',
|
||||
'partner_owner_recid':str(my_partner['recid'])})
|
||||
|
||||
# recup du nombre de formations actives et publiées dans le LMS
|
||||
conn = mariadb.connect(
|
||||
user=MYSY_GV.MYSY_MARIADB_USER,
|
||||
password=MYSY_GV.MYSY_MARIADB_USER_PASS,
|
||||
host=MYSY_GV.MYSY_MARIADB_HOST,
|
||||
port=MYSY_GV.MYSY_MARIADB_PORT,
|
||||
database=MYSY_GV.MYSY_LMS_BDD
|
||||
)
|
||||
cur = conn.cursor()
|
||||
|
||||
lms_count_qry = "select count(*) from course as a left join course_rel_user as b on a.id = b.c_id where a.visibility != '0' and b.user_id = '"+mysy_lms_user_id+"' "
|
||||
print(" ### lms_count_qry = ", lms_count_qry)
|
||||
lms_count_exec = cur.execute(lms_count_qry)
|
||||
|
||||
lms_count_courses = ""
|
||||
lms_count_courses_val = "0"
|
||||
for lms_count_courses in cur:
|
||||
print(f"lms_count_courses_val: ", lms_count_courses[0])
|
||||
lms_count_courses_val = lms_count_courses[0]
|
||||
|
||||
|
||||
return True, mysy_count,lms_count_courses_val, " "
|
||||
|
||||
except Exception as e:
|
||||
exc_type, exc_obj, exc_tb = sys.exc_info()
|
||||
mycommon.myprint(str(inspect.stack()[0][3]) + " -" + str(e) + " - Line : " + str(exc_tb.tb_lineno))
|
||||
return False, False, False, " Impossible de recuperer le nombre de formations actives dans mysy et le lms "
|
||||
|
|
28
main.py
28
main.py
|
@ -678,7 +678,7 @@ Partenair SECURITY : Cette API modifie/MAJ le password du partenaire
|
|||
def update_partner_pwd():
|
||||
# On recupere le corps (payload) de la requete
|
||||
payload = request.form.to_dict()
|
||||
print(" ### payload = ",payload)
|
||||
print(" ### update_partner_pwd payload = ",payload)
|
||||
status, retval = pa.update_partner_pwd(payload)
|
||||
return jsonify(status=status, message=retval)
|
||||
|
||||
|
@ -2668,6 +2668,32 @@ def Check_MySy_LMS_Account():
|
|||
return jsonify(status=localStatus, message=message)
|
||||
|
||||
|
||||
"""
|
||||
Cette API recuperer le nombre de formation active dans Mysy et dans le LMS
|
||||
la valeur retournée est de type : true, nb_active_mysy, nb_active_lms, message
|
||||
"""
|
||||
@app.route('/myclass/api/Get_Active_Ftions_Mysy_and_Lms/', methods=['POST','GET'])
|
||||
@crossdomain(origin='*')
|
||||
def Get_Active_Ftions_Mysy_and_Lms():
|
||||
# On recupere le corps (payload) de la requete
|
||||
payload = request.form.to_dict()
|
||||
print(" ### Get_Active_Ftions_Mysy_and_Lms : payload = ",payload)
|
||||
localStatus, mysy_nb_active_class, lms_nb_active_class, message = mysy_lms.Get_Active_Ftions_Mysy_and_Lms(payload)
|
||||
return jsonify(status=localStatus, mysy_nb_active_class = mysy_nb_active_class, lms_nb_active_class = lms_nb_active_class, message=message)
|
||||
|
||||
|
||||
"""
|
||||
Cette API permet de modifier la quantité d'un abonnement.
|
||||
On reste sur le meme prix. juste la quantité qui change
|
||||
"""
|
||||
@app.route('/myclass/api/strip_update_subscription_qty/', methods=['POST','GET'])
|
||||
@crossdomain(origin='*')
|
||||
def strip_update_subscription_qty():
|
||||
# On recupere le corps (payload) de la requete
|
||||
payload = request.form.to_dict()
|
||||
print(" ### strip_update_subscription_qty : payload = ",payload)
|
||||
localStatus, message = Stripe.strip_update_subscription_qty(payload)
|
||||
return jsonify(status=localStatus, message=message)
|
||||
|
||||
|
||||
|
||||
|
|
37
partners.py
37
partners.py
|
@ -30,7 +30,7 @@ from pymongo import ReturnDocument
|
|||
from datetime import datetime
|
||||
import GlobalVariable as MYSY_GV
|
||||
import strype_payement as Stripe
|
||||
|
||||
import lms_chamilo.mysy_lms as mysy_lms
|
||||
|
||||
|
||||
class JSONEncoder(json.JSONEncoder):
|
||||
|
@ -379,17 +379,48 @@ def update_partner_pwd(diction):
|
|||
ret_val = coll_name.find_one_and_update(
|
||||
{'recid': str(partner_recid), 'locked': '0', 'active': '1', 'pwd':mypwd},
|
||||
{"$set": mydata},
|
||||
upsert= False,
|
||||
return_document=ReturnDocument.AFTER
|
||||
)
|
||||
|
||||
|
||||
if (ret_val and ret_val['_id']):
|
||||
mycommon.myprint(str(inspect.stack()[0][3]) + "Le mot de passe du partenaire a bien ete mis à jour =" + str(ret_val['_id']))
|
||||
return True, "Le mot de passe du partenaire a bien ete mis à jour"
|
||||
mycommon.myprint(str(inspect.stack()[0][3]) + " Le mot de passe du partenaire a bien ete mis à jour dans Mysy =" + str(ret_val['_id']))
|
||||
|
||||
else:
|
||||
mycommon.myprint(str(inspect.stack()[0][3]) + " - Impossible de mettre à jour le mot de passe du partenaire recid= : " +str(partner_recid) )
|
||||
return False, " Impossible de mettre à jour le mot de passe du partenaire"
|
||||
|
||||
"""
|
||||
pres la modification du mot de passe dans Mysy, il faut voir si le partenaire
|
||||
a un compte LMS. Si c'est le cas, alors il faut mettre à jour le mot de passe dans le compte LMS aussi.
|
||||
"""
|
||||
|
||||
# Recuperation des données du partenaire
|
||||
local_status, my_partner = mycommon.get_partner_data_from_recid(partner_recid)
|
||||
if (local_status is False):
|
||||
mycommon.myprint(str(inspect.stack()[0][3]) + " - impossible de recuperer les données du partenaire")
|
||||
return False, str(inspect.stack()[0][3]) + " - impossible de recuperer les données du partenaire"
|
||||
|
||||
|
||||
if ("mysy_lms_user_id" in my_partner.keys()):
|
||||
if my_partner['mysy_lms_user_id']:
|
||||
new_diction = {}
|
||||
new_diction['token'] = my_partner['token']
|
||||
new_diction['new_password'] = confnewpwd
|
||||
new_diction['lms_user_id'] = my_partner['mysy_lms_user_id']
|
||||
|
||||
local_status, message, rowid = mysy_lms.Update_Passwd_MySy_LMS_User(new_diction)
|
||||
if( local_status is False ):
|
||||
mycommon.myprint(
|
||||
str(inspect.stack()[0][3]) + " - WARNING : impossible de mettre le mot de passe à jour dans le LMS")
|
||||
else:
|
||||
mycommon.myprint(
|
||||
str(inspect.stack()[0][
|
||||
3]) + " - La mise à jour du mot de passe dans le LMS a été faite également ")
|
||||
|
||||
|
||||
return True, " Le mot de passe a bien été changé"
|
||||
|
||||
except Exception as e:
|
||||
exc_type, exc_obj, exc_tb = sys.exc_info()
|
||||
|
|
|
@ -731,6 +731,7 @@ def stop_strip_subscription(diction):
|
|||
cancel_at_period_end=True
|
||||
)
|
||||
|
||||
|
||||
arret_abonnement = datetime.today().date() + relativedelta(months=+1)
|
||||
arrete_abonnement_formated = arret_abonnement.strftime("%d/%m/%Y")
|
||||
|
||||
|
@ -772,6 +773,118 @@ def stop_strip_subscription(diction):
|
|||
return False, "Impossible d'annuler votre abonnement"
|
||||
|
||||
|
||||
"""
|
||||
Cette fonction permet de modifier la quantité d'un abonnement
|
||||
par exemple lorqu'un partenaire change de nombre de formation sur le meme pack
|
||||
"""
|
||||
|
||||
def strip_update_subscription_qty(diction):
|
||||
try:
|
||||
|
||||
field_list_obligatoire = ['token','qty', 'old_qty']
|
||||
for val in field_list_obligatoire:
|
||||
if val not in diction:
|
||||
mycommon.myprint(
|
||||
str(inspect.stack()[0][3]) + " - La valeur '" + val + "' n'est pas presente dans liste , toutes le données obligatoire ne sont pas fournies ")
|
||||
return False, " Impossible de supprimer le moyen de payement, toutes le données obligatoire ne sont pas fournies"
|
||||
|
||||
mytoken = ""
|
||||
if ("token" in diction.keys()):
|
||||
if diction['token']:
|
||||
mytoken = diction['token']
|
||||
|
||||
qty = ""
|
||||
if ("qty" in diction.keys()):
|
||||
if diction['qty']:
|
||||
qty = diction['qty']
|
||||
|
||||
old_qty = ""
|
||||
if ("old_qty" in diction.keys()):
|
||||
if diction['old_qty']:
|
||||
old_qty = diction['old_qty']
|
||||
|
||||
retval = mycommon.check_partner_token_validity("", str(mytoken))
|
||||
|
||||
if retval is False:
|
||||
mycommon.myprint(str(inspect.stack()[0][3]) + " - Le token n'est pas valide")
|
||||
return False, "Les informations d'identification ne sont pas valident"
|
||||
|
||||
# Recuperation du recid du partenaire
|
||||
partner_recid = mycommon.get_parnter_recid_from_token(str(mytoken))
|
||||
if partner_recid is False:
|
||||
mycommon.myprint(str(inspect.stack()[0][3]) + " - Impossible de recuperer le recid du partenaire")
|
||||
return False, " Les informations d'identification sont incorrectes"
|
||||
|
||||
# recuperation de la susbscription du client
|
||||
local_ret_val = MYSY_GV.dbname['partnair_account'].find_one(
|
||||
{'token': mytoken, 'active': '1', 'locked': '0'})
|
||||
|
||||
if (local_ret_val['stripe_subscription_id'] is None):
|
||||
mycommon.myprint(
|
||||
str(inspect.stack()[0][3]) + " Impossible d'annuler le payement ")
|
||||
return False, " Impossible de changer la quantité de l'abonnement "
|
||||
|
||||
pack = ""
|
||||
if ("pack_service" in local_ret_val.keys()):
|
||||
if local_ret_val['pack_service']:
|
||||
pack = local_ret_val['pack_service']
|
||||
|
||||
price_id = ""
|
||||
if (str(pack).lower() == "gold"):
|
||||
price_id = MYSY_GV.STRIPE_GOLD_PRICE_ID
|
||||
|
||||
elif (str(pack).lower() == "standard"):
|
||||
price_id = MYSY_GV.STRIPE_STANDARD_PRICE_ID
|
||||
|
||||
elif (str(pack).lower() == "test"):
|
||||
price_id = MYSY_GV.STRIPE_TEST_PRICE_ID
|
||||
|
||||
|
||||
print(" #### str(local_ret_val['stripe_subscription_id']) = ", str(local_ret_val['stripe_subscription_id']))
|
||||
|
||||
current_subscription = stripe.Subscription.retrieve(str(local_ret_val['stripe_subscription_id']))
|
||||
|
||||
#a = stripe.SubscriptionSchedule.release( str(local_ret_val['stripe_subscription_id']), )
|
||||
a = stripe.Subscription.modify(
|
||||
str(local_ret_val['stripe_subscription_id']),
|
||||
proration_behavior='create_prorations',
|
||||
items=[{
|
||||
'id': current_subscription['items'].data[0].id,
|
||||
'quantity': qty,
|
||||
}]
|
||||
)
|
||||
|
||||
#print(" ### aa = ", a)
|
||||
arret_abonnement = datetime.today().date() + relativedelta(months=+1)
|
||||
arrete_abonnement_formated = arret_abonnement.strftime("%d/%m/%Y")
|
||||
|
||||
now = datetime.now()
|
||||
|
||||
|
||||
|
||||
partners_email = local_ret_val['email']
|
||||
partners_nom = local_ret_val['nom']
|
||||
partners_pack_service = local_ret_val['pack_service']
|
||||
partners_date_arret = arrete_abonnement_formated
|
||||
|
||||
local_ret_val = email_mgt.EmailChangeAbonnementQty( partners_email, partners_pack_service, partners_date_arret, partners_nom, old_qty, qty)
|
||||
|
||||
if( local_ret_val is False):
|
||||
mycommon.myprint(
|
||||
str(inspect.stack()[0][3]) + " - WARNING : changement qté abonnement, Impossible d'envoyer le mail de notification au partenaire")
|
||||
|
||||
return True, " ok"
|
||||
|
||||
|
||||
except Exception as e:
|
||||
exc_type, exc_obj, exc_tb = sys.exc_info()
|
||||
mycommon.myprint(str(inspect.stack()[0][3]) + " -" + str(e) + " - ERRORRRR AT Line : " + str(exc_tb.tb_lineno))
|
||||
return False, " Impossible de changer la quantité de l'abonnement "
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@app.route('/webhook', methods=['POST'])
|
||||
def webhook_received():
|
||||
# You can use webhooks to receive information about asynchronous payment events.
|
||||
|
|
Loading…
Reference in New Issue