Thank you !

Please wait while we set up your course access. This may take a few minutes.

#course-link-btn { display: none; } @-webkit-keyframes loader { 0% { margin-left: -20%; } 50% { margin-left: 85%; } 100% { margin-left: -20%; } } @keyframes loader { 0% { margin-left: -20%; } 50% { margin-left: 85%; } 100% { margin-left: -20%; } } .progress-bar { border-radius: 60px; overflow: hidden; width: 350px; margin: 0 auto; } .progress-bar span { display: block; } .bar { background: rgba(0, 0, 0, 0.075); } .progress { -webkit-animation: loader 3s ease infinite; animation: loader 3s ease infinite; background: #1d072b; color: #fff; padding: 5px; width: 35%; } #loading-text { text-align: center; margin-bottom: 0; } .center-text { text-align: center; } .get-started-section { width: 100%; } #get-started-btn { margin: 0px auto 35px; display: block; opacity: 0.4; background: #e5e7eb; cursor: no-drop; }

Getting everything ready

This can take a few minutes. Prefer not to wait? We’ll email you when everything is set up.
If you don’t hear from us, please contact [email protected]

Your purchase details:

[simpay_payment_receipt]

 

/* ================= * PayPal Payment Receipt * ================= */ /* PayPal Receipt section elements to be replaced by URL paramter values */ const studentNameEl = document.getElementById('customer-name'); const studentEmailEl = document.getElementById('customer-email-wrapper'); const paymentDescriptionlEl = document.getElementById('payment-description'); const itemNameEl = document.getElementById('item-name'); const paymentDateEl = document.getElementById('payment-date'); const paymentAmountEl = document.getElementById('payment-amount'); /* Receipt Section Elements */ const paypalReceiptSection = document.getElementById('paypal-receipt-section'); const stripeReceiptSection = document.getElementById('stripe-receipt-section'); /* Create new URL object so that paramters can be taken from it */ var currentUrl = window.location.href; var url = new URL(currentUrl); var paypalFormIdParameter = url.searchParams.get("PayerID"); if(paypalFormIdParameter) { /* Custom value parameter to JSON object */ var customParameter = url.searchParams.get("custom"); var paymentType = url.searchParams.get("option_selection1"); var customParamterObject = JSON.parse(customParameter); /* Get values of parameters passed in */ var studentName = customParamterObject.sName; var studentEmail = customParamterObject.sEmail; console.log(typeof paymentType); var paymentDate = url.searchParams.get("payment_date"); var itemName = url.searchParams.get("item_name"); var amountPaid = url.searchParams.get("mc_gross"); var currencyUsed = url.searchParams.get("mc_currency"); /* Place text from URL parameters into PayPal Receipt sectiomn */ studentNameEl.innerText = studentName; studentEmailEl.innerHTML = `${studentEmail}`; paymentDescriptionlEl.innerText = paymentType; itemNameEl.innerText = itemName; paymentDateEl.innerText = paymentDate; paymentAmountEl.innerText = `${amountPaid} ${currencyUsed}`; /* Switch visibility of two forms */ paypalReceiptSection.style.display = 'block'; stripeReceiptSection.style.display = 'none'; } /* ================= * Loading bar JS * ================= */ const emailFound = document.getElementById('customer-email'); const paymentDescription = document.getElementById('payment-description').innerText; const loaderSection = document.getElementById('loader'); const loadingAccessText = document.getElementById('loading-access-text'); const prefeNotToWaitText = document.getElementById("prefer-not-to-wait-text"); const getStartedBtn = document.getElementById('get-started-btn'); const courseAccessLoader = document.getElementById('course-access-loader-section'); if(paymentDescription === 'Full Amount' || !paymentDescription.includes('Deposit')) { if(emailFound) { /* Change loading text */ const loadingText = document.getElementById('loading-text'); var loadingMessagesCounter = 0; const loadingMessages = ['Getting everything ready','Setting up your account','Preparing the certificate content','Enrolling you to the certificate','Creating the certificate assessment','Adding you to the certificate assessment','Loading the modules with knowledge.','Completing our final checks','Silence the distractions and get ready to learn.']; const changeMessage = () => { if(loadingMessagesCounter !== loadingMessages.length) { loadingText.innerText = loadingMessages[loadingMessagesCounter]; loadingMessagesCounter += 1; } else { clearInterval(changeLoadingMessageLoop); } } changeMessage(); var changeLoadingMessageLoop = setInterval(changeMessage, 15000); /* Change Welcome text and Get started button link */ const customerName = document.getElementById('customer-name').innerText; const firstName = customerName.split(" ").shift(); const welcomeName = document.getElementById('welcome-name').innerText = ` ${firstName}`; const customerEmail = emailFound.innerText; const courseBtn = document.getElementById('course-link-btn'); courseBtn.href = `https://courses.thecorporategovernanceinstitute.com/users/express_signin?email=${customerEmail}`; // Online DipCorpGov Module 2 thinkific course id const courseId = '1336573'; // Interval var counter = 0; /* Check if user is enroled */ const checkUserInLms = async email => { if(counter < 50) { const thinkificURL = `https://tcgi-api.netlify.app/api/lms-account-status?user_email=${encodeURIComponent(email)}&course_id=${courseId}`; const thinkificSearchForUser = await fetch(thinkificURL, { method: 'GET' }); const searchForUserToJson = await thinkificSearchForUser.json(); counter += 1; if(searchForUserToJson.userFound) { clearInterval(requestLoop); clearInterval(changeLoadingMessageLoop); loaderSection.style.display = 'none'; courseBtn.style.display = 'inline-block'; getStartedBtn.style.display = 'none'; loadingAccessText.innerText = 'You now have access to the learning platform and all your course material. Enjoy your learning experience.'; prefeNotToWaitText.style.display = 'none'; } } else { clearInterval(requestLoop); clearInterval(changeLoadingMessageLoop); } } checkUserInLms(customerEmail); var requestLoop = setInterval(checkUserInLms, 5000, customerEmail); } } else { courseAccessLoader.style.display = 'none'; }