25/01/23 - 16h

master
cherif 2023-01-25 16:17:06 +01:00
parent e58266a2c8
commit 7ff6f46cb0
4 changed files with 2225 additions and 7 deletions

View File

@ -1,12 +1,10 @@
<?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="21/01/23 - 12h">
<list default="true" id="1122d9e2-679f-46d6-8c4f-97e9ae4041b5" name="Changes" comment="24/01/23 - 19h">
<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$/Session_Formation.py" beforeDir="false" afterPath="$PROJECT_DIR$/Session_Formation.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/main.py" beforeDir="false" afterPath="$PROJECT_DIR$/main.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/prj_common.py" beforeDir="false" afterPath="$PROJECT_DIR$/prj_common.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" />
@ -263,7 +261,8 @@
<MESSAGE value="18/01/23 - 21h" />
<MESSAGE value="19/01/23 - 20h" />
<MESSAGE value="21/01/23 - 12h" />
<option name="LAST_COMMIT_MESSAGE" value="21/01/23 - 12h" />
<MESSAGE value="24/01/23 - 19h" />
<option name="LAST_COMMIT_MESSAGE" value="24/01/23 - 19h" />
</component>
<component name="XDebuggerManager">
<breakpoint-manager>

View File

@ -17,22 +17,27 @@ Cette variable definit l'environnement de travail
#MYSY_ENV = "REC"
MYSY_ENV = "DEV"
# Cette variable definit l'url de base du server
CLIENT_URL_BASE = ""
if (MYSY_ENV == "PROD"):
CONNECTION_STRING = "mongodb://localhost:27017/cherifdb"
client = MongoClient(CONNECTION_STRING)
dbname = client['cherifdb']
CLIENT_URL_BASE = 'https://www.mysy-training.com/'
elif (MYSY_ENV == "DEV"):
CONNECTION_STRING = "mongodb://localhost:27017/cherifdb_dev"
client = MongoClient(CONNECTION_STRING)
dbname = client['cherifdb_dev']
CLIENT_URL_BASE = 'http://localhost:3009/'
elif (MYSY_ENV == "REC"):
CONNECTION_STRING = "mongodb://localhost:27017/cherifdb_rec"
client = MongoClient(CONNECTION_STRING)
dbname = client['cherifdb_rec']
CLIENT_URL_BASE = 'https://dev.mysy-training.com/'

File diff suppressed because one or more lines are too long

View File

@ -333,7 +333,7 @@ def confirm_suscription(diction):
confirmation_payement = stripe.PaymentIntent.confirm(
stripe_payment_id,
payment_method=str(local_ret_val['stripe_paymentmethod_id']),
return_url="http://localhost:3009/OrderConfirmation_3DS/"+str(cmd_order_id)+"/"+str(local_ret_val['pack_service'])
return_url= MYSY_GV.CLIENT_URL_BASE+"OrderConfirmation_3DS/"+str(cmd_order_id)+"/"+str(local_ret_val['pack_service'])
)
@ -357,7 +357,13 @@ def confirm_suscription(diction):
return False, " Impossible de finaliser le payement (3) ", False, False
#print(' #### confirmation_payement = ', confirmation_payement)
return True, confirmation_payement.id, confirmation_payement.status, confirmation_payement.next_action.redirect_to_url.url
myredirect_to_url = ""
if( confirmation_payement.next_action and confirmation_payement.next_action.redirect_to_url and confirmation_payement.next_action.redirect_to_url.url ):
myredirect_to_url = confirmation_payement.next_action.redirect_to_url.url
else:
myredirect_to_url = MYSY_GV.CLIENT_URL_BASE+"OrderConfirmation_3DS/"+str(cmd_order_id)+"/"+str(local_ret_val['pack_service'])
return True, confirmation_payement.id, confirmation_payement.status, myredirect_to_url
except Exception as e: