diff --git a/DjangoFiles/PaiementStripe/views.py b/DjangoFiles/PaiementStripe/views.py index 5e24bca..0c0e7c6 100644 --- a/DjangoFiles/PaiementStripe/views.py +++ b/DjangoFiles/PaiementStripe/views.py @@ -28,7 +28,6 @@ class retour_stripe(View): else: stripe.api_key = configuration.stripe_api_key - if paiement_stripe.status != Paiement_stripe.VALID : checkout_session = stripe.checkout.Session.retrieve(paiement_stripe.id_stripe) @@ -36,8 +35,11 @@ class retour_stripe(View): paiement_stripe.status = Paiement_stripe.PENDING if checkout_session.expires_at > datetime.now().timestamp() : paiement_stripe.status = Paiement_stripe.EXPIRE + paiement_stripe.save() + elif checkout_session.payment_status == "paid": paiement_stripe.status = Paiement_stripe.PAID + paiement_stripe.save() # on vérifie si les infos sont cohérente avec la db : Never Trust Input :) metadata_stripe_json = checkout_session.metadata @@ -59,6 +61,8 @@ class retour_stripe(View): # on check si il y a un rechargement de carte cashless dans la commande if metadata_db.get('recharge_carte_uuid') : + logger.info(f'{timezone.now()} retour stripe pour rechargement carte : {metadata_db.get("recharge_carte_uuid")}') + print (f'{timezone.now()} retour stripe pour rechargement carte : {metadata_db.get("recharge_carte_uuid")}') return postPaimentRecharge(paiement_stripe, request) @@ -66,9 +70,9 @@ class retour_stripe(View): else: paiement_stripe.status = Paiement_stripe.CANCELED + paiement_stripe.save() return HttpResponse(f'Le paiement a été annulé.') - paiement_stripe.save() return HttpResponse(f'ok {uuid_stripe}') diff --git a/DjangoFiles/QrcodeCashless/static/html5up-dimension/assets/css/main.css b/DjangoFiles/QrcodeCashless/static/html5up-dimension/assets/css/main.css index 478a403..e0f612a 100644 --- a/DjangoFiles/QrcodeCashless/static/html5up-dimension/assets/css/main.css +++ b/DjangoFiles/QrcodeCashless/static/html5up-dimension/assets/css/main.css @@ -460,6 +460,7 @@ input, select, textarea { input[type="password"], input[type="email"], input[type="number"], + input[type="tel"], select { height: 2.75rem; } diff --git a/DjangoFiles/QrcodeCashless/templates/html5up-dimension/index.html b/DjangoFiles/QrcodeCashless/templates/html5up-dimension/index.html index 328fe7e..fdd79bf 100644 --- a/DjangoFiles/QrcodeCashless/templates/html5up-dimension/index.html +++ b/DjangoFiles/QrcodeCashless/templates/html5up-dimension/index.html @@ -9,6 +9,7 @@