<?php
$INC_DIR = $_SERVER['DOCUMENT_ROOT'] . "/v2/app/";
include $INC_DIR . "src/common.php";

$customer_details = get_customer_details($configs);
if (empty($customer_details['package'])) {
    $homeUrl = 'index.php' . (!empty($_SERVER['QUERY_STRING']) ? ('?' . $_SERVER['QUERY_STRING']) : '');
    header('Location:' . $homeUrl);
    exit(0);
}
?>
<!DOCTYPE html>

<html lang="en">

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

    <title><?php echo $configs->step_1_name; ?></title>
    <meta content="width=device-width,initial-scale=1" name="viewport">

    <link rel="icon" type="image/png" sizes="16x16" href="../images/favicon.png">

    <link href="../css/app.css" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="../css/inner.css">
    <link rel="stylesheet" href="../css/modal.css">

    <!-- <link href="./css/css2" rel="stylesheet"> -->
    <style>
        .chkbox {
            width: auto !important;
            height: auto !important;
            appearance: checkbox !important;
            outline: auto !important;
            display: inline !important;
            text-align: center !important;
        }

        .frmCheckElemts {
            margin-top: 15px;
            text-align: center;
        }

        .frmCheckElemts label {
            font-size: 12px !important;
            font-weight: normal;
        }

        form {
            padding: 0;
        }
    </style>
    <style>
        .has-error {
            border: 1px solid #ff5e45 !important;
            background-image: url('../images/icon-validation-bad.png') !important;
            background-position: right center !important;
            background-repeat: no-repeat !important;
            background-size: 30px !important;
        }

        .no-error {
            background-image: url('../images/icon-validation-good.png') !important;
            background-position: right center !important;
            background-repeat: no-repeat !important;

            background-size: 30px !important;
        }
    </style>
    <script>
        history.pushState(null, null, window.location.href);
        history.back();
        history.forward();
        window.onpopstate = function() {
            history.go(1);
        };
    </script>
    <style type="text/css">
        .lf-progress {
            -webkit-appearance: none;
            -moz-apperance: none;
            width: 100%;
            /* margin: 0 10px; */
            height: 4px;
            border-radius: 3px;
            cursor: pointer;
        }

        .lf-progress:focus {
            outline: none;
            border: none;
        }

        .lf-progress::-moz-range-track {
            cursor: pointer;
            background: none;
            border: none;
            outline: none;
        }

        .lf-progress::-webkit-slider-thumb {
            -webkit-appearance: none !important;
            height: 13px;
            width: 13px;
            border: 0;
            border-radius: 50%;
            background: #0fccce;
            cursor: pointer;
        }

        .lf-progress::-moz-range-thumb {
            -moz-appearance: none !important;
            height: 13px;
            width: 13px;
            border: 0;
            border-radius: 50%;
            background: #0fccce;
            cursor: pointer;
        }

        .lf-progress::-ms-track {
            width: 100%;
            height: 3px;
            cursor: pointer;
            background: transparent;
            border-color: transparent;
            color: transparent;
        }

        .lf-progress::-ms-fill-lower {
            background: #ccc;
            border-radius: 3px;
        }

        .lf-progress::-ms-fill-upper {
            background: #ccc;
            border-radius: 3px;
        }

        .lf-progress::-ms-thumb {
            border: 0;
            height: 15px;
            width: 15px;
            border-radius: 50%;
            background: #0fccce;
            cursor: pointer;
        }

        .lf-progress:focus::-ms-fill-lower {
            background: #ccc;
        }

        .lf-progress:focus::-ms-fill-upper {
            background: #ccc;
        }

        .lf-player-container :focus {
            outline: 0;
        }

        .lf-popover {
            position: relative;
        }

        .lf-popover-content {
            display: inline-block;
            position: absolute;
            opacity: 1;
            visibility: visible;
            transform: translate(0, -10px);
            box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.26);
            transition: all 0.3s cubic-bezier(0.75, -0.02, 0.2, 0.97);
        }

        .lf-popover-content.hidden {
            opacity: 0;
            visibility: hidden;
            transform: translate(0, 0px);
        }

        .lf-player-btn-container {
            display: flex;
            align-items: center;
        }

        .lf-player-btn {
            cursor: pointer;
            fill: #999;
            width: 14px;
        }

        .lf-player-btn.active {
            fill: #555;
        }

        .lf-popover {
            position: relative;
        }

        .lf-popover-content {
            display: inline-block;
            position: absolute;
            background-color: #ffffff;
            opacity: 1;

            transform: translate(0, -10px);
            box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.26);
            transition: all 0.3s cubic-bezier(0.75, -0.02, 0.2, 0.97);
            padding: 10px;
        }

        .lf-popover-content.hidden {
            opacity: 0;
            visibility: hidden;
            transform: translate(0, 0px);
        }

        .lf-arrow {
            position: absolute;
            z-index: -1;
            content: '';
            bottom: -9px;
            border-style: solid;
            border-width: 10px 10px 0px 10px;
        }

        .lf-left-align,
        .lf-left-align .lfarrow {
            left: 0;
            right: unset;
        }

        .lf-right-align,
        .lf-right-align .lf-arrow {
            right: 0;
            left: unset;
        }

        .lf-text-input {
            border: 1px #ccc solid;
            border-radius: 5px;
            padding: 3px;
            width: 60px;
            margin: 0;
        }

        .lf-color-picker {
            display: flex;
            flex-direction: row;
            justify-content: space-between;
            height: 90px;
        }

        .lf-color-selectors {
            display: flex;
            flex-direction: column;
            justify-content: space-between;
        }

        .lf-color-component {
            display: flex;
            flex-direction: row;
            font-size: 12px;
            align-items: center;
            justify-content: center;
        }

        .lf-color-component strong {
            width: 40px;
        }

        .lf-color-component input[type='range'] {
            margin: 0 0 0 10px;
        }

        .lf-color-component input[type='number'] {
            width: 50px;
            margin: 0 0 0 10px;
        }

        .lf-color-preview {
            font-size: 12px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: space-between;
            padding-left: 5px;
        }

        .lf-preview {
            height: 60px;
            width: 60px;
        }

        .lf-popover-snapshot {
            width: 150px;
        }

        .lf-popover-snapshot h5 {
            margin: 5px 0 10px 0;
            font-size: 0.75rem;
        }

        .lf-popover-snapshot a {
            display: block;
            text-decoration: none;
        }

        .lf-popover-snapshot a:before {
            content: '⥼';
            margin-right: 5px;
        }

        .lf-popover-snapshot .lf-note {
            display: block;
            margin-top: 10px;
            color: #999;
        }

        .lf-player-controls>div {
            margin-right: 5px;
            margin-left: 5px;
        }

        .lf-player-controls>div:first-child {
            margin-left: 0px;
        }

        .lf-player-controls>div:last-child {
            margin-right: 0px;
        }
    </style>
</head>

<body style="max-width:600px;margin:0 auto">
    <div id="app">
        <div id="pagecontainer" class="checkout-page">
            <div id="top-1">

                <div class="breadcrumbs">
                    <ul class="breadcrumbs__list">
                        <li class="breadcrumbs__item"> <span>Qualify Now</span> </li>
                        <li class="breadcrumbs__item breadcrumbs__item_2"> <span>Select Package</span> </li>
                        <li class="breadcrumbs__item breadcrumbs__item_3 breadcrumbs__item_active"> <span>Confirm Order</span> </li>
                    </ul>
                </div>

                <p class="text-1" style="color:#000;">Final Step - Payment Information</p>
                <p class="text-2 text-3">Your order will be processed on our secure servers</p>

                <label for="billingSameAsShipping" class="payment_as_shipping_label">
                    <input type="checkbox" name="" id="billingSameAsShipping" checked="" class="bill-inp" autocomplete="off">
                    <span>Billing same as Shipping</span>
                </label>

                <div id="shortcheckoutcontainer" class="show-3ds-popup" style="margin:0 auto">
                    <form class="paymentform form" method="POST"  onsubmit="return submit_form();" action="/v2/app/src/ajax.php" id="payment-form" name="order_form">
                    <input type="hidden" name="cpid[]" id="package" value="<?=isset($customer_details['package'])?$customer_details['package']:''?>">
					<input type="hidden" id="creditCardType" name="creditCardType" value="visa">
					<input type="hidden" name="device" value="mobile">
					<input type="hidden" name="pgtag" value="mcheckout">
					<input type="hidden" name="prospectId" value="<?=isset($customer_details['prospectId'])?$customer_details['prospectId']:$_GET['prospectId']?>">
					<input type="hidden" name="AFFID" value="<?=isset($customer_details['AFFID'])?$customer_details['AFFID']:$_GET['AFFID']?>">
					<input type="hidden" name="shippingCountry" id="shippingCountry" value="US">
					<input type="hidden" name="billingCountry" id="billingCountry" value="US">
					<input type="hidden" name="billingSameAsShipping" id="billShipSame" value="yes">
					<input type="hidden" id="cc_type" name="cc_type" value="">

                        <div class="billing-form">

                            <div class="billing-title">Billing Information</div>

                            <span>First Name: </span>
                            <div class="form-holder">
                                <input class="form-control required" data-placement="auto left" name="billingFirstName" id="firstName" placeholder="First Name*" title="First Name" type="text" onkeyup="javascript: this.value = this.value.replace(/[^a-zA-Z0-9\ ]/g, &#39;&#39;);" onchange="javascript: this.value = this.value.replace(/[^a-zA-Z0-9\ ]/g, &#39;&#39;);">
                            </div>

                            <span>Last Name: </span>
                            <div class="form-holder" placeholder="Last Name*">
                                <input class="form-control required" data-placement="auto left" name="billingLastName" id="lastName" placeholder="Last Name*" title="Last Name" type="text" onkeyup="javascript: this.value = this.value.replace(/[^a-zA-Z0-9\ ]/g, &#39;&#39;);" onchange="javascript: this.value = this.value.replace(/[^a-zA-Z0-9\ ]/g, &#39;&#39;);">
                            </div>

                            <span>Zip/Postal Code:</span>
                            <div class="form-holder">
                                <input class="form-control required" data-placement="auto left" name="billingZip" id="billingZip" placeholder="Zip/Postal Code*" title="Zip Code" type="text" minlength="5" maxlength="5" value="" onkeyup="javascript: this.value = this.value.replace(/[^0-9]/g, &#39;&#39;);">
                            </div>

                            <span>Address:</span>
                            <div class="form-holder">
                                <input class="form-control required" data-placement="auto left" name="billingAddress1" id="billingAddress1" placeholder="Address*" title="Address" type="text" value="" onkeyup="javascript: this.value = this.value.replace(/[^a-zA-Z0-9\ \,\-]/g, &#39;&#39;);" onchange="javascript: this.value = this.value.replace(/[^a-zA-Z0-9\ \,\-]/g, &#39;&#39;);">
                            </div>

                            <span>State/Region:</span>
                            <div class="form-holder">
                                <select name="billingState" id="billingState" class="form-control required">
                                    <option value="" onclick="" selected="">Select Billing State</option>
                                    <option value="AL">Alabama (AL)</option>
                                    <option value="AK">Alaska (AK)</option>
                                    <option value="AS">American Samoa (AS)</option>
                                    <option value="AZ">Arizona (AZ)</option>
                                    <option value="AR">Arkansas (AR)</option>
                                    <option value="AE">Armed Forces (AE)</option>
                                    <option value="AA">Armed Forces Americas (AA)</option>
                                    <option value="AP">Armed Forces Pacific (AP)</option>
                                    <option value="CA">California (CA)</option>
                                    <option value="CO">Colorado (CO)</option>
                                    <option value="CT">Connecticut (CT)</option>
                                    <option value="DE">Delaware (DE)</option>
                                    <option value="DC">District of Columbia (DC)</option>
                                    <option value="FM">Federated States of Micronesia (FM)</option>
                                    <option value="FL">Florida (FL)</option>
                                    <option value="GA">Georgia (GA)</option>
                                    <option value="GU">Guam (GU)</option>
                                    <option value="HI">Hawaii (HI)</option>
                                    <option value="ID">Idaho (ID)</option>
                                    <option value="IL">Illinois (IL)</option>
                                    <option value="IN">Indiana (IN)</option>
                                    <option value="IA">Iowa (IA)</option>
                                    <option value="KS">Kansas (KS)</option>
                                    <option value="KY">Kentucky (KY)</option>
                                    <option value="LA">Louisiana (LA)</option>
                                    <option value="ME">Maine (ME)</option>
                                    <option value="MD">Maryland (MD)</option>
                                    <option value="MA">Massachusetts (MA)</option>
                                    <option value="MI">Michigan (MI)</option>
                                    <option value="MN">Minnesota (MN)</option>
                                    <option value="MS">Mississippi (MS)</option>
                                    <option value="MO">Missouri (MO)</option>
                                    <option value="MT">Montana (MT)</option>
                                    <option value="NE">Nebraska (NE)</option>
                                    <option value="NV">Nevada (NV)</option>
                                    <option value="NH">New Hampshire (NH)</option>
                                    <option value="NJ">New Jersey (NJ)</option>
                                    <option value="NM">New Mexico (NM)</option>
                                    <option value="NY">New York (NY)</option>
                                    <option value="NC">North Carolina (NC)</option>
                                    <option value="ND">North Dakota (ND)</option>
                                    <option value="MP">Northern Mariana Islands (MP)</option>
                                    <option value="OH">Ohio (OH)</option>
                                    <option value="OK">Oklahoma (OK)</option>
                                    <option value="OR">Oregon (OR)</option>
                                    <option value="PA">Pennsylvania (PA)</option>
                                    <option value="PR">Puerto Rico (PR)</option>
                                    <option value="MH">Republic of Marshall Islands (MH)</option>
                                    <option value="RI">Rhode Island (RI)</option>
                                    <option value="SC">South Carolina (SC)</option>
                                    <option value="SD">South Dakota (SD)</option>
                                    <option value="TN">Tennessee (TN)</option>
                                    <option value="TX">Texas (TX)</option>
                                    <option value="UT">Utah (UT)</option>
                                    <option value="VT">Vermont (VT)</option>
                                    <option value="VI">Virgin Islands of the U.S. (VI)</option>
                                    <option value="VA">Virginia (VA)</option>
                                    <option value="WA">Washington (WA)</option>
                                    <option value="WV">West Virginia (WV)</option>
                                    <option value="WI">Wisconsin (WI)</option>
                                    <option value="WY">Wyoming (WY)</option>
                                </select>
                            </div>

                            <span>City:</span>
                            <div class="form-holder">
                                <input class="form-control required" data-placement="auto left" name="billingCity" id="billingCity" placeholder="City*" title="City" type="text" value="" onkeyup="javascript: this.value = this.value.replace(/[^a-zA-Z0-9\ ]/g, &#39;&#39;);" onchange="javascript: this.value = this.value.replace(/[^a-zA-Z0-9\ ]/g, &#39;&#39;);">
                            </div>



                            <div class="billing-title">Payment Information</div>
                        </div>

                        <ul class="form-cards">
                            <li class="first-text"><span>Accepted Cards</span></li>
                            <li><img alt="" src="../images/visa.svg"></li>
                            <li><img alt="" src="../images/mastercard.svg"></li>
                        </ul>

                        <div class="checkout-form-wrapper">
                            <div class="form-holder">
                                <label>Card Number:</label>
                                <input type="tel" name="creditCardNumber" id="cardNumber" data-threeds="pan" class="form-control required masked" placeholder="•••• •••• •••• ••••" maxlength="19">
                            </div>

                            <div class="form-fields">
                                <label>Card Expiry Date:</label>
                                <div class="form-holder" id="expire_m">
                                    <select data-threeds="month" name="expmonth" id="cardMonth" class="required form-control" data-error-message="Please select a valid expiry month!">
                                        <option value="">Month</option>
                                        <option value="01">1</option>
                                        <option value="02">2</option>
                                        <option value="03">3</option>
                                        <option value="04">4</option>
                                        <option value="05">5</option>
                                        <option value="06">6</option>
                                        <option value="07">7</option>
                                        <option value="08">8</option>
                                        <option value="09">9</option>
                                        <option value="10">10</option>
                                        <option value="11">11</option>
                                        <option value="12">12</option>
                                    </select>
                                </div>

                                <div class="form-holder" id="expire_y">
                                    <select data-threeds="year" id="cardYear" required="" name="expyear" class="required form-control" data-error-message="Please select a valid expiry year!">
                                        <option value="">Year</option>
                                        <option value="2024">2024</option>
                                        <option value="2025">2025</option>
                                        <option value="2026">2026</option>
                                        <option value="2027">2027</option>
                                        <option value="2028">2028</option>
                                        <option value="2029">2029</option>
                                        <option value="2030">2030</option>
                                        <option value="2031">2031</option>
                                        <option value="2032">2032</option>
                                        <option value="2033">2033</option>
                                        <option value="2034">2034</option>
                                        <option value="2035">2035</option>
                                        <option value="2036">2036</option>
                                        <option value="2037">2037</option>
                                        <option value="2038">2038</option>
                                    </select>
                                </div>
                            </div>

                            <div class="form-holder" id="cvv">
                                <label>CVV:</label>
                                <input type="tel" name="CVV" id="cc_cvv" class="form-control fcheckout-field required" data-validate="cvv" maxlength="3" placeholder="•••" data-error-message="Please enter a valid CVV code!" onkeyup="javascript: this.value = this.value.replace(/[^0-9]/g, &#39;&#39;);">
                            </div>

                            <div class="cvv-link left"><a href="javascript:void(0)" style="margin:30px 0 0 17px;display:inline-block">What is this?</a> </div>

                            <div class="clear"></div>
                            <div class="cvv-image" style="display: none;"><img alt="" src="../images/cvv-img.png" style="margin:0 0 15px!important"></div>

                            <div id="rushtop">
                                <button id="cform-submit-btn" class="btn_pulse" name="partialsubmitbutton" style="font-size:21px" type="submit">Rush My Order Now &gt;&gt; </button>
                            </div>

                            <div class="clear"></div>
                      

                        </div>
                    </form>

                    <div class="money-back clearfix">
                        <img src="../images/mbg-seal-m.svg" alt="">
                        <p><b>Money Back Guarantee!</b> We`re so confident that Derma Clear will work for you that we are offering a <b>60-day Money Back Guarantee!</b> So, feel confident that you will get your result, or your money back!</p>
                    </div>
                </div>
            </div>
        </div>

        <div class="linebreak" style="margin:15px 0"></div>

        <div class="footer-in">
            <div class="shipping-container"> <span><strong>Fast, Free Shipping</strong> For A Limited Time</span></div>
            <ul>
                <li> <img src="../images/m-secure1.svg" alt=""></li>
                <li> <img src="../images/m-secure2.svg" alt=""></li>
                <li> <img src="../images/m-secure3.svg" alt=""></li>
            </ul>
        </div>

        <div class="linebreak" style="margin:15px 0"></div>

        <div class="secure-in"><span>Secure Server<br>Protected by<br>SSL</span></div>

        <div class="linebreak" style="margin:15px 0"></div>

        <div id="footer">
            <center>
                <p class="link">
                    
                <a href="javascript:void(0);" onClick="openNewWindow('../disclosures/privacy.php','modal');">Privacy</a> &nbsp;|&nbsp;
                <a href="javascript:void(0);"onClick="openNewWindow('../disclosures/wireless.php','modal');">Wireless Policy</a> &nbsp;|&nbsp;
					<a href="javascript:void(0);" onClick="openNewWindow('../disclosures/terms.php','modal');">Terms</a>
                   
                </p>
                <div class="text-center">
                    <p><?php echo $configs->step_1_name; ?> integrity in business practices. All products sold on this website are certified by Good Manufacturing Practices (GMP), which is the highest standard of testing in the supplement industry.</p>
                    <p>Notice: The products and information found on this site are not intended to replace professional medical advice or treatment. These statements have not been evaluated by the Food and Drug Administration. Products and statements have not been evaluated by the European Medicines Agency or Food and Drug Administration. These products are not intended to diagnose, treat, cure or prevent any disease. Individual results may vary.</p>
                </div>
            </center>
            <center>
                <div class="text-center">
                    <p class="cop-text">© <script>
                            const date = new Date;
                            document.write(date.getFullYear())
                        </script> <?php echo $configs->step_1_name; ?>. All Rights Reserved. </p>
                </div>
            </center>
            <p></p>
        </div>

    </div>

    <p id="loading-indicator" style="display:none;">Processing...</p>
    <p id="crm-response-container" style="display:none;">Limelight messages will appear here...</p>


    <script src="../js/jquery.min.js"></script>
<script src="../js/app.min.js"></script>

<div class="modal softModal">
    <div class="modal-inner soft-modal-inner">
        <a data-modal-close>&times;</a>
        <div class="modal-content soft-modal-content"></div>
    </div>
</div>

<script>
    var softModal = new VanillaModal.default( {
        modal: ".softModal",
        modalInner: ".soft-modal-inner",
        modalContent: ".soft-modal-content"
    } );
</script>

<div id="vmodal" style="display:none"></div>

<div id="vmodal-submitting" style="display:none">
    <div class='vmodal-custom-content'>
        <div style='text-align: center;'>            
            <div style='margin: 20px 0;'><span class='submitting-text'>Submitting Your Information</span><span class='dots'></span></div>  
            
            <div><img src='../images/secure.png' width='400'></div>
        </div>
    </div>
</div>


    <!-- <script type="text/javascript" src="../js/jquery-3.6.0.min.js"></script> -->
    <script type="text/javascript" src="../js/jquery.mask.min.js"></script>
    <script type="text/javascript">
        var total_price = 0;

        var allowSubmit = false;
        var submitted = false;
        var submitTmr = 0;
        var s1Tmr = 0;
        var s2Tmr = 0;
        var s3Tmr = 0;
        var s4Tmr = 0;
        var verifyEmag = false;

        $(".cvv-link").click(function(e) {
           // $(".cvv-image").slideToggle();
        });

        $('.bill-inp').click(function() {
            if ($(this).prop("checked") == true) {
                $('.billing-form').slideUp();
                $("#billingSameAsShipping").val('yes');
                $('#hidden-fields').find('input,select').removeClass('required');
                $('#billingSameAsShipping').trigger('change');
            } else {
                $('.billing-form').slideDown();
                $("#billingSameAsShipping").val('no');
                $('#hidden-fields').find('input,select').addClass('required');
                $('#billingSameAsShipping').trigger('change');
            }
        });
    </script>
    <script type="text/javascript" src="../js/custom.js"></script>

    <?php if(!empty($_SESSION['partial_pixel_fire']))
    echo $_SESSION['partial_pixel_fire'];
?>

</body>

</html>