15/04/23 - 22h
parent
cb5fc01ecd
commit
7a4a1b8c69
|
@ -488,7 +488,7 @@ function Abonnement(props) {
|
|||
getCurrentUserData();
|
||||
GetPayementMode();
|
||||
setpackprice();
|
||||
|
||||
|
||||
|
||||
}, []);
|
||||
|
||||
|
|
|
@ -18,6 +18,7 @@ import { IoAddCircleOutline } from "react-icons/io5";
|
|||
import MyPaymentMethode from "./PaymentMethode";
|
||||
import img_visa_mastercard from "./../mysy_img/visa_mastercard.png"
|
||||
import img_logo_stripe from "./../mysy_img/logo-stripe-secure.png";
|
||||
import img_loading_spin from "./../mysy_img/mysy_spin_loading.gif";
|
||||
import img_paypal from "./../mysy_img/paypal.png"
|
||||
import moment from "moment";
|
||||
import {
|
||||
|
@ -30,6 +31,7 @@ import { loadStripe } from '@stripe/stripe-js';
|
|||
import { PaymentElement } from '@stripe/react-stripe-js';
|
||||
import Popup from 'reactjs-popup';
|
||||
|
||||
|
||||
const stripePromise = loadStripe('pk_test_51LUUfAAbmaEugrFTI25uZBD3IFjbtaL6jUfRV83diDf7nco8worna4NGKhMHbPP71WCwT5EHFRdDNatxPrJWwgZ300kgH5EO4p');
|
||||
//const stripePromise_PROD = loadStripe('pk_live_51LUUfAAbmaEugrFTyfNe4Dj0vbxc5qXQqNs0rztjAKy8oSlc5EEQyJGjA8Z5kXmP2gvUMcYLUBYCIyWWzLCw59RY00PtGInkVf');
|
||||
|
||||
|
@ -453,6 +455,9 @@ function CheckOut(props) {
|
|||
}
|
||||
|
||||
|
||||
const [isLoading, setLoading] = useState();
|
||||
|
||||
|
||||
const [payment_in_process, setpayment_in_process] = useState();
|
||||
|
||||
const [orderid, setorderid] = useState();
|
||||
|
@ -477,7 +482,7 @@ function CheckOut(props) {
|
|||
// ---------- debut
|
||||
|
||||
setpayment_in_process("1");
|
||||
|
||||
setLoading(true);
|
||||
|
||||
/*
|
||||
IMPORTANT :
|
||||
|
@ -647,16 +652,18 @@ function CheckOut(props) {
|
|||
console.log(" laaaaa ")
|
||||
if (String(props.packs).toLowerCase() === String("decouverte")) {
|
||||
MySy_LMS_Account_Management();
|
||||
setLoading(false);
|
||||
alert(" La mise à jour de votre abonnement a été correctement traitée. Vous allez recevoir par email les details de la commande et la facture.")
|
||||
window.location.reload();
|
||||
} else {
|
||||
MySy_LMS_Account_Management();
|
||||
setLoading(false);
|
||||
alert(" La mise à jour de votre abonnement a été correctement traitée. Vous allez recevoir par email les details de la commande et la facture.")
|
||||
|
||||
window.location.reload();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -665,15 +672,18 @@ function CheckOut(props) {
|
|||
else {
|
||||
setapiorderid("0");
|
||||
setapiorderidmessage(data['message']);
|
||||
setLoading(false);
|
||||
}
|
||||
|
||||
|
||||
}).catch((error) => {
|
||||
console.error('Error:', error);
|
||||
setapiorderid("0");
|
||||
setLoading(false);
|
||||
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
const [paymentadded, setpaymentadded] = useState("");
|
||||
|
@ -1108,6 +1118,10 @@ function CheckOut(props) {
|
|||
return (
|
||||
<div className="checkout">
|
||||
|
||||
{isLoading && <div className="loader-container">
|
||||
<div> <img src={img_loading_spin} /> </div>
|
||||
</div>}
|
||||
|
||||
{String(apiorderid) === String("0") && <div className="koUpdateData">
|
||||
Impossible de créer la commande.<br />
|
||||
{apiorderidmessage}
|
||||
|
@ -1334,7 +1348,7 @@ function CheckOut(props) {
|
|||
variant="standard"
|
||||
/>
|
||||
|
||||
|
||||
|
||||
<TextField
|
||||
name="adr_street"
|
||||
disabled
|
||||
|
@ -1899,10 +1913,10 @@ function CheckOut(props) {
|
|||
{(String(okcommande) !== String("ko") ||
|
||||
(String(props.packs).toLowerCase() === String("decouverte"))) &&
|
||||
String(payment_in_process) !== "1"
|
||||
&& !stripe_existing_souscription_id
|
||||
&&
|
||||
|
||||
<Button variant="contained" color="success" className="div_row22 btn_enreg_cmd " onClick={Ordervalidation}>Confirmer la commande</Button>}
|
||||
&& !stripe_existing_souscription_id
|
||||
&&
|
||||
|
||||
<Button variant="contained" color="success" className="div_row22 btn_enreg_cmd " onClick={Ordervalidation}>Confirmer la commande</Button>}
|
||||
|
||||
{(String(okcommande) !== String("ko") ||
|
||||
(String(props.packs).toLowerCase() === String("decouverte"))) &&
|
||||
|
@ -1928,7 +1942,7 @@ function CheckOut(props) {
|
|||
<div className="gest_content">
|
||||
{' '}
|
||||
|
||||
<b>Important :</b> <br/>
|
||||
<b>Important :</b> <br />
|
||||
La modification de votre abonnement va entrainer la désactivation de vos formations en cours. Mais vous pourrez les réactiver selon les conditions de votre nouvel abonnement.</div>
|
||||
<div className="gest_actions">
|
||||
<div style={{ "width": "45%", "float": "left" }}>
|
||||
|
|
|
@ -547,7 +547,7 @@ const Partner = (props) => {
|
|||
if (JSON.parse(res.data.message).lms_account &&
|
||||
String(JSON.parse(res.data.message).lms_account) === "1") {
|
||||
sethas_partner_lms_url(JSON.parse(res.data.message).lms_account);
|
||||
my_lms_url = (JSON.parse(res.data.message).lms_url) + "user_portal.php?recid=" + encodeURIComponent(JSON.parse(res.data.message).lms_part_recid) +
|
||||
my_lms_url = (JSON.parse(res.data.message).lms_virtualhost_url) + "user_portal.php?recid=" + encodeURIComponent(JSON.parse(res.data.message).lms_part_recid) +
|
||||
"&mysytoken=" + encodeURIComponent(JSON.parse(res.data.message).lms_pwd_mask);
|
||||
|
||||
console.log(" ### LMS url = ", my_lms_url);
|
||||
|
|
|
@ -44,6 +44,7 @@ import { PaymentElement } from '@stripe/react-stripe-js';
|
|||
import Popup from 'reactjs-popup';
|
||||
import 'reactjs-popup/dist/index.css';
|
||||
import Formation from "./Formation";
|
||||
import img_loading_spin from "./../mysy_img/mysy_spin_loading.gif";
|
||||
|
||||
import {
|
||||
CardElement,
|
||||
|
@ -871,7 +872,7 @@ Cette fonction recuperer les stats des TOP 5 formations sur la periode saisie pa
|
|||
setPokemon(response.data); //set pokemon state
|
||||
setLoading(false); //set loading state
|
||||
});
|
||||
}, 5000);
|
||||
}, 50000);
|
||||
|
||||
|
||||
}
|
||||
|
@ -895,8 +896,8 @@ Cette fonction recuperer les stats des TOP 5 formations sur la periode saisie pa
|
|||
<button onClick={loading} id="finalise"> loading .....</button>
|
||||
<div>
|
||||
|
||||
{isLoading && <div className="loader-container">
|
||||
<div className="spinner"> loading in processsss</div>
|
||||
{isLoading && <div className="loader-container">
|
||||
<div> <img src={img_loading_spin} /> </div>
|
||||
</div>}
|
||||
|
||||
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 35 KiB |
|
@ -4,7 +4,29 @@
|
|||
font-size: 0.1rem;
|
||||
}
|
||||
|
||||
|
||||
.loader-container {
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
position: fixed;
|
||||
background: rgba(0, 0, 0, 0.834);
|
||||
z-index: 1;
|
||||
top: 0px;
|
||||
opacity: 80%;
|
||||
}
|
||||
|
||||
.spinner {
|
||||
width:20rem;
|
||||
height: 10rem;
|
||||
border: 8px solid;
|
||||
border-color: #3d5af1 transparent #3d5af1 transparent;
|
||||
border-radius: 50%;
|
||||
animation: spin-anim 1.2s linear infinite;
|
||||
background-color: red;
|
||||
color: black;
|
||||
}
|
||||
|
||||
|
||||
@media only screen and (max-width: 600px) {
|
||||
|
|
|
@ -1,4 +1,31 @@
|
|||
.partner {
|
||||
|
||||
.loader-container {
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
position: fixed;
|
||||
background: rgba(0, 0, 0, 0.834);
|
||||
z-index: 1;
|
||||
top: 0px;
|
||||
opacity: 80%;
|
||||
}
|
||||
|
||||
.spinner {
|
||||
width:20rem;
|
||||
height: 10rem;
|
||||
border: 8px solid;
|
||||
border-color: #3d5af1 transparent #3d5af1 transparent;
|
||||
border-radius: 50%;
|
||||
animation: spin-anim 1.2s linear infinite;
|
||||
background-color: red;
|
||||
color: black;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.label {
|
||||
cursor: pointer;
|
||||
color: #00ffff;
|
||||
|
|
Loading…
Reference in New Issue