18/03/2023 - 21h
parent
064c94fc76
commit
01bc9c9002
|
@ -13,7 +13,7 @@ import { useParams } from 'react-router-dom'
|
||||||
function OrderConfirmation_3DS(props) {
|
function OrderConfirmation_3DS(props) {
|
||||||
const [menu, setmenu] = useState("");
|
const [menu, setmenu] = useState("");
|
||||||
const history = useHistory();
|
const history = useHistory();
|
||||||
const { orderid, packs } = useParams()
|
const { orderid, packs, nb_class } = useParams()
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|
||||||
|
@ -94,6 +94,8 @@ function OrderConfirmation_3DS(props) {
|
||||||
if (String(res.data.status) === String("true")) {
|
if (String(res.data.status) === String("true")) {
|
||||||
setcheck_payement_finalise_order_api("true");
|
setcheck_payement_finalise_order_api("true");
|
||||||
|
|
||||||
|
MySy_LMS_Account_Management();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -110,6 +112,41 @@ function OrderConfirmation_3DS(props) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Mise à jour du compte LMs Mysy
|
||||||
|
const [MySy_LMS_Account_Management_api, setMySy_LMS_Account_Management_api] = useState("");
|
||||||
|
const [MySy_LMS_Account_Management_message, setMySy_LMS_Account_Management_message] = useState("");
|
||||||
|
function MySy_LMS_Account_Management() {
|
||||||
|
|
||||||
|
var formData_tpm = new FormData();
|
||||||
|
formData_tpm.append('token', stored_part);
|
||||||
|
//formData_tpm.append('stripe_payment_id', stripe_pi);
|
||||||
|
//formData_tpm.append('packs', packs);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Check_MySy_LMS_Account/";
|
||||||
|
|
||||||
|
axios.post(myurl, formData_tpm).then(res => {
|
||||||
|
console.log('In MySy_LMS_Account_Management status = ', res.data.status, " -- message = ", res.data.message);
|
||||||
|
if (String(res.data.status) === String("true")) {
|
||||||
|
setMySy_LMS_Account_Management_api("true");
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
setMySy_LMS_Account_Management_api("false")
|
||||||
|
setMySy_LMS_Account_Management_message(String(res.data.message))
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}).catch((error) => {
|
||||||
|
console.log('In MySy_LMS_Account_Management ', error);
|
||||||
|
setMySy_LMS_Account_Management_api("false")
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="orderconfirmation">
|
<div className="orderconfirmation">
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue