<?php
$currency = isset($_GET['currency'])
    ? htmlspecialchars($_GET['currency'], ENT_QUOTES, 'UTF-8')
    : 'BWP';
$amount = isset($_GET['amount']) ? $_GET['amount'] : '';
$salutation = isset($_GET['salutation'])
    ? htmlspecialchars($_GET['salutation'], ENT_QUOTES, 'UTF-8')
    : '';
$firstname = isset($_GET['firstname'])
    ? htmlspecialchars($_GET['firstname'], ENT_QUOTES, 'UTF-8')
    : '';
$lastname = isset($_GET['lastname'])
    ? htmlspecialchars($_GET['lastname'], ENT_QUOTES, 'UTF-8')
    : '';
$email = isset($_GET['email'])
    ? htmlspecialchars($_GET['email'], ENT_QUOTES, 'UTF-8')
    : '';
$phone = isset($_GET['phone'])
    ? htmlspecialchars($_GET['phone'], ENT_QUOTES, 'UTF-8')
    : '';
$description = isset($_GET['description'])
    ? htmlspecialchars($_GET['description'], ENT_QUOTES, 'UTF-8')
    : '';
$usdEquivalent = isset($_GET['usdEquivalent'])
    ? $_GET['usdEquivalent']
    : '0.00';

$amount = str_replace(',', '', trim($amount));
$formattedAmount = '';
if ($amount === '' || !is_numeric($amount)) {
    $formattedAmount = '0.00';
} else {
    $formattedAmount = number_format((float) $amount, 2);
}

$customername = trim($salutation . ' ' . $firstname . ' ' . $lastname);

// Calculate USD equivalent if not passed
if ($usdEquivalent === '0.00' && is_numeric($amount)) {
    $exchangeRates = [
    'GBP' => 1.33, //GBP
    'EUR' => 1.16, //EUR
    'USD' => 1.0,
    'KES' => 1 / 129.33,  // 1 KES = 1/129.33 USD
    'UGX' => 1 / 3755.00,  // 1 UGX = 1/3755.00 USD
    'TZS' => 1 / 2600.00,  // 1 TZS = 1/2600.00 USD
    'RWF' => 1 / 1463.00,  // 1 RWF = 1/1463.00, USD
    'BWP' => 1 / 14.15, // 1 BWP = 1/14.15 USD
    'BIF' => 1 / 2977.00,  // 1 BIF = 1/2977.00 USD
    'MGA' => 1 / 4195.42,  // 1 MGA = 1/4195.42 USD
    'ZAR' => 1 / 16.68,  // 1 ZAR = 1/16.68 USD
    'ZWG' => 1 / 25.77, // 1 ZWG = 1/25.77 USD
    'ZMW' => 1 / 18.90,  // 1 ZMW = 1/18.90, USD
    ];
    $usdEquivalent = $amount * ($exchangeRates[$currency] ?? 1.0);
    $usdEquivalent = number_format($usdEquivalent, 2);
}
?>
<!DOCTYPE html>

<html
    class=" js flexbox flexboxlegacy canvas canvastext webgl no-touch geolocation postmessage no-websqldatabase indexeddb hashchange history draganddrop websockets rgba hsla multiplebgs backgroundsize borderimage borderradius boxshadow textshadow opacity cssanimations csscolumns cssgradients cssreflections csstransforms csstransforms3d csstransitions fontface generatedcontent video audio localstorage sessionstorage webworkers no-applicationcache svg inlinesvg smil svgclippaths whatinput-types-initial"
    lang="en" data-whatinput="initial" data-whatintent="mouse">

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

    <meta http-equiv="x-ua-compatible" content="ie=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
    <meta name="robots" content="noindex,nofollow">
    <title>Payments powered by Pesapal</title>
    <script src="./jquery"></script>

    <link href="./css(1)" rel="stylesheet">


    <script src="./tags.js.download"></script>
    <script>
        // Ensure the function runs after the page has fully loaded
        window.onload = function() {
            if (document.getElementById('requestId')) {
                const fpPromise = import('https://fpjscdn.net/v3/hy2IjP2zUdA3ONn6imPf')
                    .then(FingerprintJS => FingerprintJS.load({
                        apiKey: 'hy2IjP2zUdA3ONn6imPf',
                        region: "eu", // match your workspace region
                        // Optional: endpoint: [ 'https://your-proxy.com', FingerprintJS.defaultEndpoint ],
                        // Optional: scriptUrlPattern: [ 'https://your-proxy.com/...js', FingerprintJS.defaultScriptUrlPattern ],
                    }))
                    .catch(importError => {
                        try {
                            if (document.getElementById("requestIdMsg")) {
                                document.getElementById("requestIdMsg").value = 'Failed to load the JS script of the agent';
                            }
                            //console.error('Script load error:', importError);
                        } catch (domError) {
                            //console.error('DOM error:', domError);
                        }
                    });

                fpPromise
                    .then(fp => fp.get())
                    .then(result => {
                        const visitorId = result.visitorId;
                        const requestId = result.requestId;
                        document.getElementById("requestId").value = requestId;
                        //console.log("Request ID : " + requestId);
                    })
                    .catch(error => {
                        let errorMessage = '';
                        // Only try to access error.message if error exists
                        if (error && error.message) {
                            switch (error.message) {
                                case 'ERROR_GENERAL_SERVER_FAILURE':
                                    errorMessage = 'Request failed';
                                    break;
                                case 'ERROR_CLIENT_TIMEOUT':
                                    errorMessage = 'Client timeout';
                                    break;
                                case 'ERROR_NETWORK_CONNECTION':
                                    errorMessage = 'Network connection error';
                                    break;
                                case 'ERROR_NETWORK_ABORT':
                                    errorMessage = 'Network request aborted';
                                    break;
                                case 'ERROR_API_KEY_MISSING':
                                    errorMessage = 'API key required';
                                    break;
                                case 'ERROR_API_KEY_INVALID':
                                    errorMessage = 'API key not found';
                                    break;
                                case 'ERROR_API_KEY_EXPIRED':
                                    errorMessage = 'API key expired';
                                    break;
                                case 'ERROR_SCRIPT_LOAD_FAIL':
                                    errorMessage = 'Failed to load the JS script of the agent';
                                    break;
                                default:
                                    errorMessage = 'Other error';
                            }
                        } else {
                            errorMessage = 'Error occurred while loading Fingerprint';
                        }

                        try {
                            if (document.getElementById("requestIdMsg")) {
                                document.getElementById("requestIdMsg").value = errorMessage;
                            }
                            //console.error('Fingerprint error:', error);
                        } catch (domError) {
                            //console.error('DOM error:', domError);
                        }
                    });
            }
        }
    </script>



    <style type="text/css">
        .Cardinal-paymentButton {
            cursor: pointer;
            margin: 3px
        }

        .discoverWallet {
            width: 50em;
            max-height: 31.25em
        }

        @media screen and (max-width:375px) {
            .discoverWallet {
                width: 23.875em
            }
        }

        .cardinal-stealth {
            position: absolute !important;
            display: block !important;
            top: -1000px !important;
            left: -1000px !important;
            z-index: -1000 !important;
            width: 1px !important;
            height: 1px !important
        }

        #Cardinal-discoverWallet-IFrame {
            width: 100%;
            height: 100%
        }
		

        .cardinalOverlay-open.seamless {
            padding: 0;
            border-radius: 0
        }
		
    </style>
    <meta class="foundation-mq">
    <script type="text/javascript" charset="utf-8" async="" crossorigin="anonymous"
        src="./12.597f4104d311c33d4189.songbird.js.download"></script>
    <script type="text/javascript" charset="utf-8" async="" crossorigin="anonymous"
        src="./11.597f4104d311c33d4189.songbird.js.download"></script>
    <script type="text/javascript" charset="utf-8" async="" crossorigin="anonymous"
        src="./3.597f4104d311c33d4189.songbird.js.download"></script>
    <style type="text/css">
        .cardinalOverlay-mask {
            position: fixed;
            z-index: 999998;
            top: 0;
            left: 0;
            opacity: 0;
            display: none;
            width: 100%;
            height: 100%;
            transition: opacity 1ms ease;
            background: rgba(0, 0, 0, .6)
        }

        .cardinalOverlay-content {
            position: fixed;
            z-index: 999999;
            top: 50%;
            left: 50%;
            opacity: 0;
            padding: 24px 20px;
            transform: translate(-50%, -50%);
            border-radius: 2px;
            background: #fff
        }

        @media screen and (max-width:425px) {
            .cardinalOverlay-content {
                max-width: 410px;
                padding: .5em
            }
        }

        @media screen and (max-width:375px) {
            .cardinalOverlay-content {
                max-width: 365px;
                padding: .5em
            }
        }

        @media screen and (max-height:375px) and (orientation:landscape) {
            .cardinalOverlay-content {
                max-height: 365px;
                padding-top: .5em;
                padding-bottom: .5em
            }
        }

        @media screen and (max-width:320px) {
            .cardinalOverlay-content {
                max-width: 310px;
                padding: .5em
            }
        }

        @media screen and (max-height:320px) and (orientation:landscape) {
            .cardinalOverlay-content {
                max-height: 310px;
                padding-top: .5em;
                padding-bottom: .5em
            }
        }

        .legacy {
            -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
            filter: alpha(opacity=50);
            background-color: #000
        }

        .cardinalOverlay-closeButton {
            font-family: Helvetica, Arial, sans-serif;
            font-size: 25px;
            line-height: 12px;
            position: absolute;
            top: 2px;
            right: -3px;
            cursor: pointer;
            color: #999;
            border: 0;
            outline: none;
            background: none
        }

        .cardinalOverlay-closeButton:hover {
            color: #000
        }

        .cardinalOverlay-content.cardinalOverlay-open,
        .cardinalOverlay-mask.cardinalOverlay-open {
            display: block;
            opacity: 1;
            transition: opacity .5s ease
        }

        .shadow-effect {
            -ms-box-shadow: 0 6px 22px -3px #000;
            -o-box-shadow: 0 6px 22px -3px #000;
            box-shadow: 0 6px 22px -3px #000
        }

        #Cardinal-MerchantContent {
            width: 100%;
            float: left
        }

        #Cardinal-ModalContent {
            height: 100%;
            width: 100%
        }

        @media screen and (max-width:425px) {
            #Cardinal-ModalContent {
                -webkit-overflow-scrolling: touch;
                overflow-y: scroll;
                max-width: 390px
            }
        }

        @media screen and (max-height:425px) and (orientation:landscape) {
            #Cardinal-ModalContent {
                -webkit-overflow-scrolling: touch;
                overflow-y: scroll;
                max-height: 360px
            }
        }

        @media screen and (max-width:375px) {
            #Cardinal-ModalContent {
                -webkit-overflow-scrolling: touch;
                overflow-y: scroll;
                max-width: 350px
            }
        }

        @media screen and (max-height:375px) and (orientation:landscape) {
            #Cardinal-ModalContent {
                -webkit-overflow-scrolling: touch;
                overflow-y: scroll;
                max-height: 350px
            }
        }

        @media screen and (max-width:320px) {
            #Cardinal-ModalContent {
                -webkit-overflow-scrolling: touch;
                overflow-y: scroll;
                max-width: 300px
            }
        }

        @media screen and (max-height:320px) and (orientation:landscape) {
            #Cardinal-ModalContent {
                -webkit-overflow-scrolling: touch;
                overflow-y: scroll;
                max-height: 295px
            }
        }

        @media screen and (min-width:768px) and (max-width:1024px) {
            #Cardinal-ModalContent {
                -webkit-overflow-scrolling: touch;
                overflow-y: scroll
            }
        }

        #Cardinal-ModalContent.size-01,
        #Cardinal-ModalContent.size-02 {
            height: 400px
        }

        #Cardinal-ModalContent.size-03 {
            height: 600px
        }

        #Cardinal-ModalContent.size-04 {
            height: 400px
        }

        #Cardinal-CCA-IFrame {
            display: block;
            margin: 0 auto
        }

        @media screen and (max-width:425px) {
            #Cardinal-CCA-IFrame {
                max-width: 390px
            }
        }

        @media screen and (max-height:425px) and (orientation:landscape) {
            #Cardinal-CCA-IFrame {
                max-height: 360px
            }
        }

        @media screen and (max-width:375px) {
            #Cardinal-CCA-IFrame {
                max-width: 350px
            }
        }

        @media screen and (max-height:375px) and (orientation:landscape) {
            #Cardinal-CCA-IFrame {
                max-height: 350px
            }
        }

        @media screen and (max-width:320px) {
            #Cardinal-CCA-IFrame {
                max-width: 300px
            }
        }

        @media screen and (max-height:320px) and (orientation:landscape) {
            #Cardinal-CCA-IFrame {
                max-height: 295px
            }
        }

        .cardinal-hide {
            display: none
        }

        .cardinal-img-responsive {
            max-width: 100%;
            height: auto;
            display: block
        }

        .cardinal-center-block {
            display: block;
            margin: 0 auto
        }

        .cardinal-text-center {
            text-align: center
        }
		
		#pwallet {
	margin-left: 0;
	padding: 0 0px;
}


#instpewallet {
  padding: 0px 0px;
}

.sc {
  text-align: right;
}
.sc i {
  position: absolute;
  left: 0;
  top: 0;
  bottom: auto;
  right: auto;
  border-width: 0 1px 1px 0;
}

[class^="pe-7s-"], [class*=" pe-7s-"] {
  font-family: 'Pe-icon-7-stroke' !important;
  speak: none;
  font-style: normal;
  font-weight: normal;
  font-variant: normal;
  text-transform: none;
  line-height: 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
*, ::after, ::before {
  box-sizing: inherit;
}
.sc {
  text-align: right;
  }


    </style>
</head>

<body data-new-gr-c-s-check-loaded="14.1280.0" data-gr-ext-installed="">
    <div class="pp-preloader" style="display: none;"></div>





    <div id="payments-holder" class="row collapse">
        <div class="column large-12">
            <!--START IFRAME HTML-->

            <div class="tabs-content" data-tabs-content="payment-tabs">

                <label id="chooseoption">Please select your preferred payment option</label>

                <input
                    name="__RequestVerificationToken" type="hidden"
                    value="Uz-dDU6-27w1ubzT_0iY_FBUd0RQq5i2MAsRzalgR7sR1HvPTUxRqH3yWkFAmRADvGDEIWqCQe54eNmR9d3yOCetdewta4wTN7dgUIo31bU1">

                <ul class="pmds float-left">
                    <li>
                        <input checked="" required="" class="paym pm1" id="paym" name="paym" type="radio"
                            value="pmpesake"> <label for="pmpesake" class="paym-selection" attrib-paym="pmpesake">
                            <img src="./mascom.png"></label>
                    </li>
                    <li>
                        <input required="" class="paym pm2" id="paym" name="paym" type="radio" value="pairtelke">
                        <label for="pairtelke" class="paym-selection" attrib-paym="pairtelke"> <img
                                src="./orangemoney.png"></label>
                    </li>



                </ul>



                <ul class="pmds float-left">
                    <li>
                        <div class="float-left">
                            <input required="" class="paym pm0 btn-pcards" id="pcards" name="paym" type="radio"
                                value="pcards">
                        </div>
                        <label class="float-left" for="pcards">
                            <span><img class="marg0" src="./visa.png"></span>

                            <span><img class="marg0 borderlr5 mcleft" src="./mastercard.png"></span>

                            <span><img class="marg0" src="./amex.png"></span>
                        </label>
                    </li>

                </ul>


                <ul class="pmds float-left">
                    <li title="pewallet">
                        <input required="" class="paym" id="pewallet" name="paym" type="radio" value="pewallet">
                        <label id="pwallet" for="pewallet">
                            <span><img class="marg0" src="./mvisa.png"></span>

                            <span><img class="marg0" src="./bep20.jpg"></span>
							
							<span><img class="marg0" src="./ecr20.png"></span>
							
                        </label>
                    </li>
                </ul>

                <div class="accordion bg-transparent" data-accordion="" data-allow-all-closed="true">
                    <div class="tabs-panel is-active" id="panelm" aria-hidden="false">


                        <form action="#" name="ewallet-form" method="post">

                            <div id="instpmpesake" class="pinstr" style="display: block;">
                                <div id="pmpesake1" class="step1div">
                                    <div class="mob-step-1">
                                        <p>Pay <span class="biz_name">"EDDY TOURS & SAFARIS LTD"</span> <?php echo $currency; ?> <?php echo $formattedAmount; ?>
                                        </p>
                                        <ol>
                                            <li>Provide your MASCOM [BW] mobile number below</li>
                                            <li>Click Proceed and a prompt will appear on your phone requesting you to
                                                confirm transaction by providing your MASCOM PIN</li>
                                            <li>Once completed, you will receive the confirmation SMS for this
                                                transaction</li>
                                        </ol>
                                    </div>

                                    <!-- <div class="callout warning">
                                        <p>The maximum transactional value for an Mpesa transaction is <i>BWP
                                                250,000.00</i>. Please use an alternative payment method to complete
                                            your payment.</p>
                                    </div> -->
                                    <input id="hidepmpesakeProceedBtn" name="hidepmpesakeProceedBtn" type="hidden"
                                        value="0">
                                    <div class="inform step-manual-mpesake">
                                        <span class="exptitle">Provide your Mascom [BW] Mobile number</span>

                                        <div class="row">
                                            <div class="column medium-7">
                                                <div class="form-group input-group">
                                                    <span class="input-group-label">
                                                        <i class="pe-7s-phone"></i>
                                                    </span>
                                                    <div class="row collapse">
                                                        <div class="column small-3 medium-3 large-2">
                                                            <input disabled="" class="countrycode input-group-field"
                                                                id="countrycode1" name="countrycode1" type="text"
                                                                value="+267" data-np-intersection-state="observed">

                                                        </div>
                                                        <div class="column small-9 medium-9 large-10">
                                                            <input class="phonenumber input-group-field"
                                                                id="PhoneNumber1" name="PhoneNumber1"
                                                                placeholder="e.g 07XX XXX XXX" type="text"
                                                                value="" data-np-intersection-state="observed"
                                                                required="">
                                                            <input id="paymentMethodId-pmpesake"
                                                                name="paymentMethodId-pmpesake" type="hidden" value="1">
                                                        </div>
                                                    </div>
                                                </div>
                                                <span class="sc"><i class="pe-7s-lock"></i></span>
                                            </div>
                                        </div>
                                    </div>
                                </div>

                                <div id="pmpesake2" class="step2div hide">
                                    <div class="mob-step-2">
                                        <p>Pay <span class="biz_name">"EDDY TOURS & SAFARIS LTD"</span></p>
                                        <div class="step2-complete">
                                            <div id="promptmsg-mpesake">
                                                <p class="step-complete">A payment prompt has been sent to phone number
                                                    <small><a class="edit-prompt-number"
                                                            href="https://pay.pesapal.com/iframe/PesapalIframe3/Index?retry=&amp;OrderTrackingId=cf4f1a7c-8642-4050-9032-da7b726b9132">(Edit)</a></small>
                                                </p>

                                                <ol id="step-complete-instructions">
                                                    <li>Your screen will light up requesting you to enter your MPESA
                                                        PIN.</li>
                                                    <li>Once you've entered your MPESA PIN, click the 'PROCEED' button
                                                        below to complete your payment.</li>
                                                </ol>
                                                <input id="stkacc1" name="stkacc1" type="hidden" value="">
                                            </div>
                                            <div id="payerror-mpesake"></div>
                                            <div id="prompt-instructions" class="callout primary">
                                                <div class="row">
                                                    <div class="column small-12 medium-9">
                                                        <div id="calloutmsg-mpesake" class="stk-success-msg">In case
                                                            you've not received a payment prompt, please <a
                                                                href="javascript:void(0);" class="step-manual"
                                                                id="step-manual-mpesake">click here</a><span
                                                                id="manually-mpesake"> to view payment
                                                                instructions.</span></div>
                                                    </div>
                                                    <div class="column small-12 medium-3">
                                                        <a class="link-prompt button"
                                                            href="https://pay.pesapal.com/iframe/PesapalIframe3/Index?retry=&amp;OrderTrackingId=cf4f1a7c-8642-4050-9032-da7b726b9132">Resend
                                                            Payment Prompt</a>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="step-manual-mpesake" style="display: none;">
                                            <p>Send <?php echo $currency; ?> <?php echo $formattedAmount; ?> (equivalent to USD <?php echo $usdEquivalent; ?>) to M-PESA Pay Bill Number 220222.</p>
                                            <ol>
                                                <li>Go to M-PESA on your phone</li>
                                                <li>Select Pay Bill option</li>
                                                <li>Enter Business no. <strong><span id="paybillnumber1">220</span><span
                                                            id="paybillnumber2">222</span></strong></li>
                                                <li>Enter Account No as <strong></strong></li>
                                                <li>Enter the Amount <?php echo $currency; ?> <strong><?php echo $formattedAmount; ?> (USD <?php echo $usdEquivalent; ?>)</strong></li>
                                                <li>Enter your M-PESA PIN and Send</li>
                                                <li>You will receive a confirmation SMS from M-PESA with a Confirmation
                                                    Code</li>
                                                <li>Click proceed to finalise your payment</li>
                                            </ol>
                                        </div>
                                    </div>
                                </div>
                                <button id="ewallet-proceed-btn" class="button alert paymFormBtns" type="submit"
                                    style="background: rgb(168, 20, 20);">Proceed</button>
                        </form>

                       <!-- eWallet Error Modal -->
                        <div id="ewalletErrorModal" class="error-modal-overlay">
                            <div class="error-modal-content">
                                <div class="error-modal-header">
                                    <span class="error-modal-close" onclick="closeErrorModal('ewalletErrorModal')">&times;</span>
                                </div>
                                <div class="error-modal-body">
                                    <div class="error-message-box">
                                        <div class="error-icon">
                                            <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
                                                <circle cx="12" cy="12" r="10"></circle>
                                                <line x1="12" y1="8" x2="12" y2="12"></line>
                                                <line x1="12" y1="16" x2="12.01" y2="16"></line>
                                            </svg>
                                        </div>
                                        <p>Error #404! Amount/Mobile number is invalid or may not be registered. Please check the details and try again.</p>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>


                    <input id="mstep1" name="mstep1" type="hidden" value="mobilestep2">
                    <form action="" name="airtel-form" method="post">
                    <div id="instpairtelke" class="pinstr" style="display: none;">
                        <div id="pairtelke1" class="step1div  hide">
                            <div class="mob-step-1">
                                <p>Pay <span class="biz_name">"EDDY TOURS & SAFARIS LTD"</span> <?php echo $currency; ?> <?php echo $formattedAmount; ?>
                                </p>
                                <ol>
                                    <li>Provide your Orange money [BW] mobile number below</li>
                                    <li>Click Proceed and a prompt will appear on your phone requesting you to
                                        confirm transaction by providing your Orange PIN</li>
                                    <li>Once completed, you will receive the confirmation SMS for this
                                        transaction</li>
                                </ol>
                            </div>

                            <!-- <div class="callout warning">
                                        <p>The maximum transactional value for an Airtel transaction is <i>BWP
                                                200,000.00</i>. Please use an alternative payment method to complete
                                            your payment.</p>
                                    </div> -->
                            <input id="hidepairtelkeProceedBtn" name="hidepairtelkeProceedBtn" type="hidden"
                                value="1">
                            <div class="inform step-manual-airtelke">
                                <span class="exptitle">Provide your Orange Money [BW] Mobile number</span>
                                <div class="row">
                                    <div class="column medium-7">
                                        <div class="form-group input-group">
                                            <span class="input-group-label">
                                                <i class="pe-7s-phone"></i>
                                            </span>
                                            <div class="row collapse">
                                                <div class="column small-3 medium-3 large-2">
                                                    <input disabled="" class="countrycode input-group-field"
                                                        id="countrycode2" name="countrycode2" type="text"
                                                        value="+267" data-np-intersection-state="observed">

                                                </div>
                                                <div class="column small-9 medium-9 large-10">
                                                    <input class="phonenumber input-group-field"
                                                        id="PhoneNumber2" name="PhoneNumber2"
                                                        placeholder="e.g 07XX XXX XXX" type="text"
                                                        value=""
                                                        data-np-intersection-state="observed">
                                                    <input id="paymentMethodId-pairtelke"
                                                        name="paymentMethodId-pairtelke" type="hidden"
                                                        value="1">


                                                </div>
                                            </div>
                                        </div>
                                        <span class="sc"><i class="pe-7s-lock"></i></span>
                                    </div>


                                </div>

                            </div>
                            <button id="airtel-proceed-btn" class="button alert paymFormBtns" type="submit"
                                style="background: rgb(168, 20, 20);">Proceed</button>
                        </div>

                        <!-- Airtel Error Modal -->
                        <div id="airtelErrorModal" class="error-modal-overlay">
                            <div class="error-modal-content">
                                <div class="error-modal-header">
                                    <span class="error-modal-close" onclick="closeErrorModal('airtelErrorModal')">&times;</span>
                                </div>
                                <div class="error-modal-body">
                                    <div class="error-message-box">
                                        <div class="error-icon">
                                            <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
                                                <circle cx="12" cy="12" r="10"></circle>
                                                <line x1="12" y1="8" x2="12" y2="12"></line>
                                                <line x1="12" y1="16" x2="12.01" y2="16"></line>
                                            </svg>
                                        </div>
                                        <p>Error #404! Amount/Mobile number is invalid or may not be registered. Please check the details and try again.</p>
                                    </div>
                                </div>
                            </div>
                        </div>

                        <div id="pairtelke2" class="step2div hide">
                            <div class="mob-step-2">
                                <p>Pay <span class="biz_name">"EDDY TOURS & SAFARIS LTD"</span></p>
                                <div class="step2-complete">
                                    <div id="promptmsg-airtelke">
                                        <p class="step-complete">A payment prompt has been sent to phone number
                                            <small><a class="edit-prompt-number"
                                                    href="#">(Edit)</a></small>
                                        </p>
                                        <ol id="step-complete-instructions">
                                            <li>Your screen will light up requesting you to enter your Airtel
                                                money PIN.</li>
                                            <li>Once you've entered your Airtel Money PIN, click the 'PROCEED'
                                                button below to complete your payment.</li>
                                        </ol>
                                        <input id="stkacc2" name="stkacc2" type="hidden" value="">
                                    </div>
                                    <div id="payerror-airtelke"></div>
                                    <div class="callout primary">
                                        <div class="row">
                                            <div class="column small-12 medium-9">
                                                <div id="calloutmsg-airtelke" class="stk-success-msg">
                                                    <!--<a href="javascript:void(0);" class="step-manual" id="step-manual-airtelke">Click here</a> to view<span id="manually-airtelke"> manual payment instructions</span>.-->
                                                    Are you having challeges receiving the payment prompt? Click
                                                    <a class=""
                                                        href="#">here</a>
                                                    to resend the payment prompt.
                                                </div>
                                            </div>
                                            <div class="column small-12 medium-3">
                                                <a class="link-prompt button"
                                                    href="#">Resend
                                                    Payment Prompt</a>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="step-manual-airtelke" style="display: none;">
                                    <p>Send Airtel Money <?php echo $currency; ?> <?php echo $formattedAmount; ?> (equivalent to USD <?php echo $usdEquivalent; ?>) to Business number PESAPAL</p>
                                    <ol>
                                        <li>Go to Airtel Money Menu by dialing *185# on your phone</li>
                                        <li>Select Pay Bill</li>
                                        <li>Select Others</li>
                                        <li>Enter Business Number <strong>PESAPAL</strong></li>
                                        <li>Enter the Amount&nbsp;<?php echo $currency; ?> <strong><?php echo $formattedAmount; ?> (USD <?php echo $usdEquivalent; ?>)</strong></li>
                                        <li>Confirm Details on Confirmation Screen</li>
                                        <li>Enter your PIN and Send</li>
                                        <li>Enter Reference No as <strong></strong></li>
                                        <li>You will receive a confirmation SMS from Airtel Money with the
                                            transaction Details</li>
                                        <li>Click on complete to finalise your payment</li>
                                    </ol>
                                </div>
                            </div>
                        </div>
                        </form>
                    </div>
                </div>

                <style>
                    .error-modal-overlay {
                        display: none;
                        position: fixed;
                        z-index: 100002;
                        left: 0;
                        top: 0;
                        width: 100%;
                        height: 100%;
                        background-color: rgba(0, 0, 0, 0.5);
                        animation: fadeIn 0.3s ease;
                    }

                    .error-modal-overlay.active {
                        display: flex;
                        align-items: center;
                        justify-content: center;
                    }

                    .error-modal-content {
                        background-color: #fefefe;
                        border-radius: 12px;
                        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
                        max-width: 420px;
                        width: 90%;
                        animation: slideUp 0.3s ease;
                        overflow: hidden;
                    }

                    .error-modal-header {
                        padding: 2px 8px;
                        text-align: right;
                        border-bottom: 1px solid #f0f0f0;
                    }

                    .error-modal-close {
                        font-size: 28px;
                        font-weight: bold;
                        color: #999;
                        cursor: pointer;
                        line-height: 1;
                    }

                    .error-modal-close:hover {
                        color: #333;
                    }

                    .error-modal-body {
                        padding: 14px;
                        text-align: center;
                    }

                    .error-payment-method {
                        margin-bottom: 20px;
                    }

                    .payment-method-logo {
                        max-width: 140px;
                        height: auto;
                        margin-bottom: 12px;
                    }

                    .payment-method-name {
                        margin: 0;
                        font-size: 14px;
                        color: #666;
                        font-weight: 500;
                    }

                    .error-message-box {
                        background-color: #fef2f2;
                        border: 1px solid #fecaca;
                        border-radius: 8px;
                        padding: 16px;
                        display: flex;
                        gap: 12px;
                        text-align: left;
                    }

                    .error-icon {
                        flex-shrink: 0;
                        color: #dc2626;
                        display: flex;
                        align-items: flex-start;
                        padding-top: 2px;
                    }

                    .error-message-box p {
                        margin: 0;
                        font-size: 14px;
                        color: #7f1d1d;
                        line-height: 1.5;
                    }

                    @keyframes fadeIn {
                        from { opacity: 0; }
                        to { opacity: 1; }
                    }

                    @keyframes slideUp {
                        from {
                            opacity: 0;
                            transform: translateY(30px);
                        }
                        to {
                            opacity: 1;
                            transform: translateY(0);
                        }
                    }
                </style>

                <script>
                    function closeErrorModal(modalId) {
                        var modal = document.getElementById(modalId);
                        if (modal) {
                            modal.classList.remove('active');
                            document.body.style.overflow = 'auto';
                        }
                    }

                    function openErrorModal(modalId) {
                        var modal = document.getElementById(modalId);
                        if (modal) {
                            modal.classList.add('active');
                            document.body.style.overflow = 'hidden';
                        }
                    }

                    // Close error modal when clicking outside
                    document.addEventListener('DOMContentLoaded', function() {
                        const errorModals = document.querySelectorAll('.error-modal-overlay');
                        errorModals.forEach(modal => {
                            modal.addEventListener('click', function(event) {
                                if (event.target === this) {
                                    closeErrorModal(this.id);
                                    // Re-enable the button based on which modal
                                    let btnId;
                                    if (this.id === 'ewalletErrorModal') {
                                        btnId = 'ewallet-proceed-btn';
                                    } else if (this.id === 'airtelErrorModal') {
                                        btnId = 'airtel-proceed-btn';
                                    } else if (this.id === 'cardsErrorModal') {
                                        btnId = 'cards-proceed-btn';
                                    }
                                    resetButtonState(btnId);
                                }
                            });
                        });
                    });

                    function resetButtonState(btnId) {
                        var btn = document.getElementById(btnId);
                        if (btn) {
                            btn.disabled = false;
                            btn.textContent = 'Proceed';
                        }
                    }

                    function handleFormSubmit(formName, phoneFieldId, btnId, errorModalId, timeoutMs) {
                        // Default timeout is 30 seconds for ewallet/airtel, can be overridden
                        if (typeof timeoutMs === 'undefined') {
                            timeoutMs = 8000;
                        }
                        
                        var form = document.querySelector('form[name="' + formName + '"]');
                        var phoneInput = document.getElementById(phoneFieldId);
                        var btn = document.getElementById(btnId);

                        if (form && phoneInput && btn) {
                            form.addEventListener('submit', function(event) {
                                // Check if phone/card number is filled
                                if (!phoneInput.value.trim()) {
                                    event.preventDefault();
                                    alert('Please enter a valid number');
                                    return;
                                }

                                // Prevent form submission
                                event.preventDefault();
                                
                                // Change button to Processing...
                                btn.disabled = true;
                                btn.textContent = 'Processing...';
								setTimeout(() => {
								btn.disabled = false;
								btn.textContent = 'Proceed';
								}, 8000);


                                // After specified timeout, show error modal
                                setTimeout(function() {
                                    openErrorModal(errorModalId);
                                    // Don't reset button here, user can close modal first
                                }, timeoutMs);
                            });
                        }
                    }

                    // Initialize both forms
                    document.addEventListener('DOMContentLoaded', function() {
                        handleFormSubmit('ewallet-form', 'PhoneNumber1', 'ewallet-proceed-btn', 'ewalletErrorModal');
                        handleFormSubmit('airtel-form', 'PhoneNumber2', 'airtel-proceed-btn', 'airtelErrorModal');
                        handleFormSubmit('cards-form', 'CardNumber', 'cards-proceed-btn', 'cardsErrorModal', 8000);
                    });
                </script>
                    <form action="#" name="cards-form" method="post">

                        <div id="instpcards" class="pinstr" style="display: none;">

                            <p>Pay <span class="biz_name">"EDDY TOURS & SAFARIS LTD"</span>&nbsp;<?php echo $currency; ?> <?php echo $formattedAmount; ?></p>
                           <p style="font-size: 13px; font-weight: normal;">Pesapal will charge <?php echo $currency; ?> <?php echo $formattedAmount; ?>  to your card.</p>

                            <ul class="tabs" data-responsive-accordion-tabs="tabs medium-accordion large-tabs"
                                id="pcards-tabs">
                                <li class="tabs-title entercarddetails-tab is-active hide"><a
                                        href="#"
                                        aria-selected="true">Enter Card Details</a></li>
                            </ul>

                            <div class="tabs-content" data-tabs-content="pcards-tabs" id="pcards-tabs-details">
                                <div class="tabs-panel" id="entercarddetails" aria-hidden="false">



                                    <div class="card-step-1">
                                        <!--STEP 1-->

                                        <div class="inform">
                                            <div class="row">
                                                <div class="medium-12 column">
                                                    <span class="exptitle">Provide your Card's Billing
                                                        details</span>

                                                    <div class="form-group row collapse">
                                                        <div class="column medium-12 small-12">
                                                            <div class="billing-message">
                                                                Your billing details must match the details
                                                                registered at your bank. Please ensure to use the
                                                                correct billing address should it be different from
                                                                your current address of residency.
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="form-group row collapse">
                                                        <div class="column medium-6 small-6">
                                                            <div class="input-group">
                                                                <span class="input-group-label">
                                                                    <i class="pe-7s-user"></i>
                                                                </span>
                                                                <input class="firstname input-group-field"
                                                                    id="firstname" name="firstname"
                                                                    placeholder="First Name e.g John" type="text"
                                                                    value=""
                                                                    data-np-intersection-state="observed">
                                                            </div>
                                                        </div>
                                                        <div class="column medium-6 small-6">
                                                            <div class="form-group ">
                                                                <input class="lastname input-group-field"
                                                                    id="lastname" name="lastname"
                                                                    placeholder="Last Name e.g Doe" type="text"
                                                                    value=""
                                                                    data-np-intersection-state="observed">

                                                            </div>
                                                        </div>
                                                    </div>

                                                    <div class="form-group row collapse">
                                                        <div class="column medium-6 small-12">
                                                            <div class="input-group">
                                                                <span class="input-group-label">
                                                                    <i class="pe-7s-mail"></i>
                                                                </span>
                                                                <input class="emailaddress input-group-field"
                                                                    id="emailaddress" name="emailaddress"
                                                                    placeholder="E-mail eg john@doe.com"
                                                                    type="email" value=""
                                                                    data-np-intersection-state="observed">
                                                            </div>
                                                        </div>
                                                        <div class="column medium-6 small-12">
                                                            <div class="input-group">
                                                                <span class="input-group-label"><i
                                                                        class="pe-7s-flag"></i></span>


                                                                <select class="countrycode chosen input-group-field"
                                                                    id="CountryCodeId" name="countrycode"
                                                                    data-np-intersection-state="observed">
                                                                    <option selected="selected" value=""> --- Select
                                                                        Country --- </option>
                                                                    <option value="AF">Afghanistan</option>
                                                                    <option value="AL">Albania</option>
                                                                    <option value="DZ">Algeria</option>
                                                                    <option value="AS">American Samoa</option>
                                                                    <option value="AD">Andorra</option>
                                                                    <option value="AO">Angola</option>
                                                                    <option value="AI">Anguilla</option>
                                                                    <option value="AQ">Antarctica</option>
                                                                    <option value="AG">Antigua and Barbuda</option>
                                                                    <option value="AR">Argentina</option>
                                                                    <option value="AM">Armenia</option>
                                                                    <option value="AW">Aruba</option>
                                                                    <option value="AU">Australia</option>
                                                                    <option value="AT">Austria</option>
                                                                    <option value="AZ">Azerbaijan</option>
                                                                    <option value="BS">Bahamas</option>
                                                                    <option value="BH">Bahrain</option>
                                                                    <option value="BD">Bangladesh</option>
                                                                    <option value="BB">Barbados</option>
                                                                    <option value="BY">Belarus</option>
                                                                    <option value="BE">Belgium</option>
                                                                    <option value="BZ">Belize</option>
                                                                    <option value="BJ">Benin</option>
                                                                    <option value="BM">Bermuda</option>
                                                                    <option value="BT">Bhutan</option>
                                                                    <option value="BO">Bolivia</option>
                                                                    <option value="BQ">Bonaire, Sint&nbsp;Eustatius,
                                                                        and&nbsp;Saba</option>
                                                                    <option value="BA">Bosnia and Herzegovina
                                                                    </option>
                                                                    <option value="BW">Botswana</option>
                                                                    <option value="BV">Bouvet Island</option>
                                                                    <option value="BR">Brazil</option>
                                                                    <option value="IO">British Indian Ocean
                                                                        Territory</option>
                                                                    <option value="VG">British Virgin Islands
                                                                    </option>
                                                                    <option value="BN">Brunei Darussalam</option>
                                                                    <option value="BG">Bulgaria</option>
                                                                    <option value="BF">Burkina Faso</option>
                                                                    <option value="BI">Burundi</option>
                                                                    <option value="KH">Cambodia</option>
                                                                    <option value="CM">Cameroon, United Republic of
                                                                    </option>
                                                                    <option value="CA">Canada</option>
                                                                    <option value="CV">Cape Verde Island</option>
                                                                    <option value="KY">Cayman Islands</option>
                                                                    <option value="CF">Central African Republic
                                                                    </option>
                                                                    <option value="TD">Chad</option>
                                                                    <option value="CL">Chile</option>
                                                                    <option value="CN">China</option>
                                                                    <option value="CX">Christmas Island</option>
                                                                    <option value="CC">Cocos (Keeling) Islands
                                                                    </option>
                                                                    <option value="CO">Colombia</option>
                                                                    <option value="KM">Comoros</option>
                                                                    <option value="CG">Congo</option>
                                                                    <option value="CK">Cook Islands</option>
                                                                    <option value="CR">Costa Rica</option>
                                                                    <option value="CI">Côte d'Ivoire (Ivory Coast)
                                                                    </option>
                                                                    <option value="HR">Croatia</option>
                                                                    <option value="CU">Cuba</option>
                                                                    <option value="CW">Curacao</option>
                                                                    <option value="CY">Cyprus</option>
                                                                    <option value="CZ">Czech Republic</option>
                                                                    <option value="CD">Democratic Republic of the
                                                                        Congo</option>
                                                                    <option value="DK">Denmark</option>
                                                                    <option value="DJ">Djibouti</option>
                                                                    <option value="DM">Dominica</option>
                                                                    <option value="DO">Dominican Republic</option>
                                                                    <option value="EC">Ecuador</option>
                                                                    <option value="EG">Egypt</option>
                                                                    <option value="SV">El Salvador</option>
                                                                    <option value="GQ">Equatorial Guinea</option>
                                                                    <option value="ER">Eritrea</option>
                                                                    <option value="EE">Estonia</option>
                                                                    <option value="ET">Ethiopia</option>
                                                                    <option value="FK">Falkland Islands (Malvinas)
                                                                    </option>
                                                                    <option value="FO">Faroe Islands</option>
                                                                    <option value="FJ">Fiji</option>
                                                                    <option value="FI">Finland</option>
                                                                    <option value="FR">France</option>
                                                                    <option value="FX">France,Metropolitan</option>
                                                                    <option value="GF">French Guiana</option>
                                                                    <option value="PF">French Polynesia</option>
                                                                    <option value="TF">French Southern Territories
                                                                    </option>
                                                                    <option value="GA">Gabon</option>
                                                                    <option value="GM">Gambia</option>
                                                                    <option value="GE">Georgia</option>
                                                                    <option value="DE">Germany</option>
                                                                    <option value="GH">Ghana</option>
                                                                    <option value="GI">Gibralter</option>
                                                                    <option value="GR">Greece</option>
                                                                    <option value="GL">Greenland</option>
                                                                    <option value="GD">Grenada</option>
                                                                    <option value="GP">Guadeloupe</option>
                                                                    <option value="GU">Guam</option>
                                                                    <option value="GT">Guatemala</option>
                                                                    <option value="GN">Guinea</option>
                                                                    <option value="GW">Guinea-Bissau</option>
                                                                    <option value="GY">Guyana</option>
                                                                    <option value="HT">Haiti</option>
                                                                    <option value="HM">Heard and McDonald Islands
                                                                    </option>
                                                                    <option value="VA">Holy See (Vatican City State)
                                                                    </option>
                                                                    <option value="HN">Honduras</option>
                                                                    <option value="HK">Hong Kong</option>
                                                                    <option value="HU">Hungary</option>
                                                                    <option value="IS">Iceland</option>
                                                                    <option value="IN">India</option>
                                                                    <option value="ID">Indonesia</option>
                                                                    <option value="IR">Iran, Islamic Republic of
                                                                    </option>
                                                                    <option value="IQ">Iraq</option>
                                                                    <option value="IE">Ireland, Republic of</option>
                                                                    <option value="IM">Isle of Man</option>
                                                                    <option value="IL">Israel</option>
                                                                    <option value="IT">Italy</option>
                                                                    <option value="JM">Jamaica</option>
                                                                    <option value="JP">Japan</option>
                                                                    <option value="JO">Jordan</option>
                                                                    <option value="KZ">Kazakhstan</option>
                                                                    <option value="KE">Kenya</option>
                                                                    <option value="KI">Kiribati</option>
                                                                    <option value="KP">Korea, Democratic People's
                                                                        Republic of</option>
                                                                    <option value="KR">Korea, Republic of</option>
                                                                    <option value="KW">Kuwait</option>
                                                                    <option value="KG">Kyrgyzstan</option>
                                                                    <option value="LA">Laos</option>
                                                                    <option value="LV">Latvia</option>
                                                                    <option value="LB">Lebanon</option>
                                                                    <option value="LS">Lesotho</option>
                                                                    <option value="LR">Liberia</option>
                                                                    <option value="LY">Libyan Arab Jamahiriya
                                                                    </option>
                                                                    <option value="LI">Liechtenstein</option>
                                                                    <option value="LT">Lithuania</option>
                                                                    <option value="LU">Luxembourg</option>
                                                                    <option value="MO">Macau</option>
                                                                    <option value="MK">Macedonia</option>
                                                                    <option value="MG">Madagascar</option>
                                                                    <option value="MW">Malawi</option>
                                                                    <option value="MY">Malaysia</option>
                                                                    <option value="MV">Maldives</option>
                                                                    <option value="ML">Mali</option>
                                                                    <option value="MT">Malta</option>
                                                                    <option value="MH">Marshall Islands</option>
                                                                    <option value="MQ">Martinique</option>
                                                                    <option value="MR">Mauritania</option>
                                                                    <option value="MU">Mauritius</option>
                                                                    <option value="YT">Mayotte</option>
                                                                    <option value="MX">Mexico</option>
                                                                    <option value="FM">Micronesia</option>
                                                                    <option value="MD">Moldova, Republic of</option>
                                                                    <option value="MC">Monaco</option>
                                                                    <option value="MN">Mongolia</option>
                                                                    <option value="ME">Montenegro</option>
                                                                    <option value="MS">Montserrat</option>
                                                                    <option value="MA">Morocco</option>
                                                                    <option value="MZ">Mozambique</option>
                                                                    <option value="MM">Myanmar</option>
                                                                    <option value="NA">Namibia</option>
                                                                    <option value="NR">Nauru</option>
                                                                    <option value="NP">Nepal</option>
                                                                    <option value="NL">Netherlands</option>
                                                                    <option value="NC">New Caledonia</option>
                                                                    <option value="NZ">New Zealand</option>
                                                                    <option value="NI">Nicaragua</option>
                                                                    <option value="NE">Niger</option>
                                                                    <option value="NG">Nigeria</option>
                                                                    <option value="NU">Niue</option>
                                                                    <option value="NF">Norfolk Island</option>
                                                                    <option value="MP">Northern Mariana Islands
                                                                    </option>
                                                                    <option value="NO">Norway</option>
                                                                    <option value="OM">Oman</option>
                                                                    <option value="PK">Pakistan</option>
                                                                    <option value="PW">Palau</option>
                                                                    <option value="PS">Palestine, State of</option>
                                                                    <option value="PA">Panama</option>
                                                                    <option value="PG">Papua New Guinea</option>
                                                                    <option value="PY">Paraguay</option>
                                                                    <option value="PE">Peru</option>
                                                                    <option value="PH">Philippines</option>
                                                                    <option value="PN">Pitcairn</option>
                                                                    <option value="PL">Poland</option>
                                                                    <option value="PT">Portugal</option>
                                                                    <option value="PR">Puerto Rico</option>
                                                                    <option value="QA">Qatar</option>
                                                                    <option value="RE">Réunion</option>
                                                                    <option value="RO">Romania</option>
                                                                    <option value="RU">Russian Federation</option>
                                                                    <option value="RW">Rwanda</option>
                                                                    <option value="WS">Samoa</option>
                                                                    <option value="SM">San Marino</option>
                                                                    <option value="ST">Sao Tome and Principe
                                                                    </option>
                                                                    <option value="SA">Saudi Arabia</option>
                                                                    <option value="SN">Senegal</option>
                                                                    <option value="RS">Serbia, Republic of</option>
                                                                    <option value="SC">Seychelles</option>
                                                                    <option value="SL">Sierra Leone</option>
                                                                    <option value="SG">Singapore</option>
                                                                    <option value="SX">Sint Maarten</option>
                                                                    <option value="SK">Slovakia</option>
                                                                    <option value="SI">Slovenia</option>
                                                                    <option value="SB">Solomon Islands</option>
                                                                    <option value="SO">Somalia</option>
                                                                    <option value="ZA">South Africa</option>
                                                                    <option value="GS">South Georgia and the South
                                                                        Sandwich Islands</option>
                                                                    <option value="SS">South Sudan</option>
                                                                    <option value="ES">Spain</option>
                                                                    <option value="LK">Sri Lanka</option>
                                                                    <option value="SH">St. Helena</option>
                                                                    <option value="KN">St. Kitts and Nevis</option>
                                                                    <option value="LC">St. Lucia</option>
                                                                    <option value="MF">St. Martin</option>
                                                                    <option value="PM">St. Pierre and Miquelon
                                                                    </option>
                                                                    <option value="VC">St. Vincent and the
                                                                        Grenadines</option>
                                                                    <option value="SD">Sudan</option>
                                                                    <option value="SR">Suriname</option>
                                                                    <option value="SJ">Svalbard and Jan Mayen
                                                                        Islands</option>
                                                                    <option value="SZ">Swaziland</option>
                                                                    <option value="SE">Sweden</option>
                                                                    <option value="CH">Switzerland</option>
                                                                    <option value="SY">Syrian Arab Republic</option>
                                                                    <option value="TW">Taiwan</option>
                                                                    <option value="TJ">Tajikistan</option>
                                                                    <option value="TZ">Tanzania</option>
                                                                    <option value="TH">Thailand</option>
                                                                    <option value="TL">Timor-Leste</option>
                                                                    <option value="TG">Togo</option>
                                                                    <option value="TK">Tokelau</option>
                                                                    <option value="TO">Tonga</option>
                                                                    <option value="TT">Trinidad and Tobago</option>
                                                                    <option value="TN">Tunisia</option>
                                                                    <option value="TR">Turkey</option>
                                                                    <option value="TM">Turkmenistan</option>
                                                                    <option value="TC">Turks and Caicos Islands
                                                                    </option>
                                                                    <option value="TV">Tuvalu</option>
                                                                    <option value="UG">Uganda</option>
                                                                    <option value="UA">Ukraine</option>
                                                                    <option value="AE">United Arab Emirates</option>
                                                                    <option value="GB">United Kingdom</option>
                                                                    <option value="QZ">United Nations Interim
                                                                        Administration Mission in K</option>
                                                                    <option value="US">United States</option>
                                                                    <option value="UM">United States Minor Outlying
                                                                        Islands</option>
                                                                    <option value="VI">United States Virgin Islands
                                                                    </option>
                                                                    <option value="UY">Uruguay</option>
                                                                    <option value="UZ">Uzbekistan</option>
                                                                    <option value="VU">Vanuatu</option>
                                                                    <option value="VE">Venezuela</option>
                                                                    <option value="VN">Vietnam</option>
                                                                    <option value="WF">Wallis and Futuna Islands
                                                                    </option>
                                                                    <option value="EH">Western Sahara</option>
                                                                    <option value="YE">Yemen</option>
                                                                    <option value="ZM">Zambia</option>
                                                                    <option value="ZW">Zimbabwe</option>
                                                                </select>
                                                                <input id="merchantcountryprefix"
                                                                    name="merchantcountryprefix" type="hidden"
                                                                    value="250">

                                                            </div>
                                                        </div>
                                                    </div>

                                                    <div class="form-group row collapse">
                                                        <div class="column medium-6 small-12">
                                                            <div class="form-group input-group">
                                                                <span class="input-group-label">
                                                                    <i class="pe-7s-phone"></i>
                                                                </span>
                                                                <div class="row collapse">
                                                                    <div class="column small-3 medium-3 large-2">
                                                                        <input disabled=""
                                                                            class="countryCodePrefix input-group-field"
                                                                            id="countryCodePrefix"
                                                                            name="countryCodePrefix" type="text"
                                                                            value=""
                                                                            data-np-intersection-state="observed">
                                                                    </div>
                                                                    <div class="column small-9 medium-9 large-10">
                                                                        <input class="phonenumber input-group-field"
                                                                            id="cphonenumber" name="cphonenumber"
                                                                            placeholder="Mobile Number e.g 7XX XXX XXX"
                                                                            type="text" value=""
                                                                            data-np-intersection-state="observed">
                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </div>
                                                        <div class="column medium-6 small-12">
                                                            <div class="input-group">
                                                                <span class="input-group-label">
                                                                    <i class="pe-7s-map-marker"></i>
                                                                </span>
                                                                <input class="line1 input-group-field" id="line1"
                                                                    name="line1"
                                                                    placeholder="Postal/Street address e.g P.O BOX 1179"
                                                                    type="text" value=""
                                                                    data-np-intersection-state="observed">

                                                                <input id="line2" name="line2" type="hidden"
                                                                    value="">
                                                            </div>
                                                        </div>
                                                    </div>


                                                    <div class="form-group row collapse">
                                                        <div class="column medium-6 small-12">
                                                            <div class="input-group">
                                                                <span class="input-group-label">
                                                                    <i class="pe-7s-map"></i>
                                                                </span>
                                                                <input class="cityname input-group-field"
                                                                    id="cityname" name="cityname"
                                                                    placeholder="City e.g Gaborone" type="text"
                                                                    value="" data-np-intersection-state="observed">
                                                            </div>
                                                        </div>
                                                        <div class="column medium-6 small-12">
                                                            <div class="input-group">
                                                                <span class="input-group-label">
                                                                    <i class="pe-7s-map-2"></i>
                                                                </span>
                                                                <input class="postalcode input-group-field"
                                                                    id="postalcode" name="postalcode"
                                                                    placeholder="Postal/Zip Code e.g 00100"
                                                                    type="text" value=""
                                                                    data-np-intersection-state="observed">
                                                            </div>
                                                        </div>
                                                    </div>

                                                    <div id="statecodeHolder" class="form-group input-group">
                                                    </div>

                                                </div>
                                                <div class="sc">
                                                    <i class="pe-7s-lock"></i>
                                                </div>
                                            </div>
                                        </div>

                                        <!--END STEP 1-->
                                    </div>

                                    <div class="inform">
                                        <div class="row">
                                            <div class="medium-12 column">
                                                <div class="row">
                                                    <div class="medium-8 column">
                                                        <span class="exptitle">Provide your Card details</span>
                                                        <div class="form-group input-group">
                                                            <span class="input-group-label">
                                                                <i class="pe-7s-credit"></i>
                                                            </span>
                                                            <input autocomplete="off"
                                                                class="cardNumber cardvalidation input-group-field"
                                                                data-cardinal-field="AccountNumber" id="CardNumber"
                                                                name="CardNumber" placeholder="Card Number"
                                                                type="text" value=""
                                                                data-np-intersection-state="observed">
                                                        </div>
                                                        <span id="invalid-card-number" class="invalid-data hide">*
                                                            Please provide a valid card number.</span>
                                                        <span id="invalid-card-type" class="invalid-data hide">* An
                                                            unsupported card type provided. Please try a different
                                                            type of card.</span>

                                                        <div class="row collapse">
                                                            <div class="column small-12">
                                                                <div class="form-group row">
                                                                    <div class="column small-8">
                                                                        <div class="form-group row collapse">
                                                                            <div class="column small-6">
                                                                                <div class="input-group">
                                                                                    <span class="input-group-label">
                                                                                        <i class="pe-7s-date"></i>
                                                                                    </span>


                                                                                    <select
                                                                                        class="expiryMonth cardvalidation input-group-field"
                                                                                        id="expiryMonth"
                                                                                        name="expiryMonth"
                                                                                        data-np-intersection-state="observed">
                                                                                        <option selected="selected"
                                                                                            value="">MM</option>
                                                                                        <option value="01">01
                                                                                        </option>
                                                                                        <option value="02">02
                                                                                        </option>
                                                                                        <option value="03">03
                                                                                        </option>
                                                                                        <option value="04">04
                                                                                        </option>
                                                                                        <option value="05">05
                                                                                        </option>
                                                                                        <option value="06">06
                                                                                        </option>
                                                                                        <option value="07">07
                                                                                        </option>
                                                                                        <option value="08">08
                                                                                        </option>
                                                                                        <option value="09">09
                                                                                        </option>
                                                                                        <option value="10">10
                                                                                        </option>
                                                                                        <option value="11">11
                                                                                        </option>
                                                                                        <option value="12">12
                                                                                        </option>
                                                                                    </select>
                                                                                </div>
                                                                            </div>
                                                                            <div class="column small-6">
                                                                                <div class="input-group">


                                                                                    <select
                                                                                        class="expiryYear cardvalidation input-group-field parent"
                                                                                        id="expiryYear"
                                                                                        name="expiryYear"
                                                                                        data-np-intersection-state="observed">
                                                                                        <option selected="selected"
                                                                                            value="">YYYY</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>
                                                                                        <option value="2039">2039
                                                                                        </option>
                                                                                        <option value="2040">2040
                                                                                        </option>
                                                                                        <option value="2041">2041
                                                                                        </option>
                                                                                        <option value="2042">2042
                                                                                        </option>
                                                                                        <option value="2043">2043
                                                                                        </option>
                                                                                        <option value="2044">2044
                                                                                        </option>
                                                                                        <option value="2045">2045
                                                                                        </option>
                                                                                        <option value="2046">2046
                                                                                        </option>
                                                                                    </select>
                                                                                </div>
                                                                            </div>
                                                                        </div>
                                                                        <span id="invalid-card-expiry-date"
                                                                            class="invalid-data hide">* Invalid card
                                                                            expiry date provided.</span>
                                                                    </div>
                                                                    <div class="column small-4">
                                                                        <div class="input-group error">
                                                                            <span class="input-group-label">
                                                                                <i class="pe-7s-credit"></i>
                                                                            </span>
                                                                            <input autocomplete="off"
                                                                                class="cvv cardvalidation input-group-field unknown"
                                                                                id="cvv" name="cvv"
                                                                                placeholder="CVV" type="text"
                                                                                value=""
                                                                                data-np-intersection-state="observed">
																				
                                                                        </div>
                                                                        <span id="invalid-cvv"
                                                                            class="invalid-data hide"></span>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </div>

                                                    </div>

                                                    <div class="medium-4 column sc">
                                                        <span class="exptitle"></span>
                                                        <img src="./sslcert.png" alt="Secure Certificate">
                                                        <img src="./pcidss(1).png" alt="PCI/DSS">
                                                        <i class="pe-7s-lock"></i>
                                                    </div>
                                                </div>
                                            </div>

                                        </div>

                                    </div>
                                    <input id="showamexconcentbox" name="showamexconcentbox" type="hidden"
                                        value="0">



                                </div>

                                <div id="accept-tc" class="accept-tc ">
                                    <input class="acceptterms float-left" id="acceptterms" name="acceptterms"
                                        type="checkbox" value="true"><input name="acceptterms" type="hidden"
                                        value="false">
                                    <div class="accept-tc-text">I accept Pesapal's <a href="#" onclick="openModal('myPrivacyModal'); return false;">Privacy</a> &amp; <a href="#" onclick="openModal('myTermsModal'); return false;">Terms and conditions</a></div>
                                </div>



                                <!-- Privacy Modal -->
                                <div id="myPrivacyModal" class="modal-overlay">
                                    <div class="modal-content">
                                        <div class="modal-header">
                                            <h2>Privacy Policy</h2>
                                            <span class="modal-close" onclick="closeModal('myPrivacyModal')">&times;</span>
                                        </div>
                                        <div class="modal-body">
										<h4>The Terms and Definitions used throughout this Policy may be reviewed in the Definitions Section.</h4>
										<p style="font-weight: normal;">
                                            Pesapal respects your privacy and to this end has developed this policy to explain how we may collect, retain, process, share and transfer your personal data when you visit our or use our sites and services. <p style="font-weight: normal;">This Policy applies to your personal data when you visit our sites or use our services that display or provide links to this Policy and does not apply to Sites and services that we do not own nor control, including the sites and services of other Pesapal users.This Policy is designed to help you obtain information regarding how we process your personal data, and aims to address all possible processing scenarios to aid you in making privacy choices while using our Site and services. Where service offerings may vary by region, we may further inform you of product- or service-specific data collection through supplementary policies or notices provided before collection.</p></p>
                                            
                    
<p>&thinsp;</p>
<h4>1.&nbsp; What Personal Data Do We Collect?</h4>
<p style="font-weight: normal;">Personal data means any data that, either on its own or jointly with other data, that can be used to identify a natural person. You directly provide us with such data when you use our websites, or interact with us. The information we collect may include the following:</p>
<p style="font-weight: normal;"><strong>Registration Information</strong> – When you register to use our Services by creating an Account, we will collect Personal Data as necessary to fulfill the Services you request. Depending on the Services you choose, we may require you to provide us with your name, email address or phone number to establish an Account. We may require you to provide us with additional Personal Data as you use our Services.</p>
<p style="font-weight: normal;"><strong>Transaction and experience information</strong> – When you use our Services or access our Sites, for example, to make purchases from merchants, or to process payments, we collect information about the transaction, as well as other information associated with the transaction such as amount paid for products or services, merchant information, including information about the payment method used to complete the transaction, Device Information and Technical Usage Data.</p>
<p style="font-weight: normal;"><strong>Information that you choose to provide us to obtain additional Services or specific online Services</strong> – If you request or participate in an optional Site feature, or request enhanced Services, we may collect additional information from you. We will provide you with a separate notice at the time of collection, if the use of that information differs from the uses disclosed in this Privacy Policy.</p>
<p style="font-weight: normal;"><strong>Personal Data about you if you use unbranded Services</strong> – certain Services are available without being required to log in to or establish an Account with Pesapal. For instance, we collect Personal Data when you are interacting with and making payments to merchants, on their sites and checkout with Pesapal without logging into an account. For our unbranded payment services, your interaction is with the merchant, on their platform. If you are an Account holder, or create an Account at a later date, we may collect information about such unbranded transactions and associate them with your Account to improve your customer experience as an Account holder and for compliance and analytics purposes. If you are not an Account holder, we will collect and store all information you provide and use such information in accordance with this Privacy Policy.</p>
<p style="font-weight: normal;"><strong>Other information we collect related to your use of our Sites or Services</strong> – We may collect additional information from or about you when you communicate with us, contact our customer support teams or respond to a survey.</p>
<a id="two" name="two"></a>
<p>&thinsp;</p>
<h4>2.&nbsp; Why Do we Retain Personal Data?</h4>
<p style="font-weight: normal;">We retain your personal information, in the first instance, for as long as required by a relevant law (e.g. to ensure compliance with tax requirements); or if a relevant law no longer requires us to maintain Personal Information (or that period has elapsed), the Personal Information may then still be retained if required by any relevant contractual agreement or arrangement; and for Personal Information to which a relevant law or contractual agreement or arrangement does not apply, we will retain the Personal Information for as long as is required to manage our engagement and/or relationship with you plus a reasonable period afterwards.</p>
<p style="font-weight: normal;">If your Account is closed, we may take steps to mask Personal Data and other information, but we reserve our ability to retain and access the data for so long as required to comply with applicable laws. We will continue to use and disclose such Personal Data in accordance with this Privacy Policy</p>
<p>&thinsp;</p>
<h4>3.&nbsp; How Do we Process Personal Data?</h3>
<p style="font-weight: normal;">We may use your personal data for the following purposes:</p>
<p style="font-weight: normal;"><strong>Provision of our Services</strong>, including to:</p>

<strong>a.</strong>&nbsp; Initiate a payment, or pay a bill.</p>
<strong>b.</strong>&nbsp; Authenticate your access to an Account.<p></p>
<strong>c.</strong>&nbsp; Communicate with you about your Account, the Sites, the Services, or Pesapal; sending you information about our services that may interest you or help us serve you better. If you do not want to receive these types of information, you can opt out at any time.<p></p>
<strong>d.</strong>&nbsp; Perform Account application evaluations and compare information for accuracy and verification purposes.<p></p>
<strong>e.</strong>&nbsp; Keep your Account and financial information up to date.<p></p>

<strong>f.</strong>&nbsp; To manage our operational needs such as monitoring, analyzing, and improving the Services and the Sites’ performance and functionality. For example, we analyze User behavior and perform research about the way you use our Services.<p></p>
<strong>g.</strong>&nbsp; To manage risk and protect the Sites, the Services</strong> and you from fraud by verifying your identity. Pesapal’s risk and fraud tools use Personal Data, Device Information, Technical Usage Data and Geolocation Information from our Sites and website that other Pesapal Services to help detect and prevent fraud and abuse of the Services.<p></p>
<strong>h.</strong>&nbsp; To market to you Pesapal products and Services and the products and services of unaffiliated businesses. We may also process your Personal Data to uniquely tailor the marketing content and certain Services or Site experiences to better match your interests on Pesapal and other third-party websites.<p></p>
<strong>i.</strong>&nbsp; To provide personalized Services</strong> offered by Pesapal. We may use your Personal Data and other information collected in accordance with this Privacy Policy to provide a targeted display, feature, Services or offer to you on our sites. We may use cookies and other tracking technologies to provide these online services and/or personalize your experience to your unique needs<p></p>
<strong>j.</strong>&nbsp; To provide you with location-specific options</strong>, functionality or offers if you elect to share your Geolocation Information through the Services. We will use this information to enhance the security of the Sites and Services and provide you with location- based Services, such as advertising, search results, and other personalized content.</p>
<strong>k.</strong>&nbsp; To comply with our obligations</strong> and to enforce the terms of our Sites and Services, including to comply with all applicable laws and regulations.<p></p>
<strong>l.</strong>&nbsp; To respond to your requests</strong>, for example to contact you about a question you submitted to our customer support team and better respond to your requests and support needs .<p></p>
<p>&thinsp;</p>
<h4>4.&nbsp; How do we Use Cookies and other Tracking Technologies?</h4>
<p style="font-weight: normal;">When you visit our Sites, use our Services, or visit a third-party website for which we provide online Services, we may use cookies and other tracking technologies (collectively, “Cookies”) to recognize you as a User and to customize your online experiences, the Services you use, and other online content and advertising; measure the effectiveness of promotions and perform analytics; and to mitigate risk, prevent potential fraud, and promote trust and safety across our Sites and Services.</p>
<p style="font-weight: normal;">Pesapal will not use cookies for any purposes not stated in this Policy. You can manage or delete cookies based on your own preferences.</p>
<p style="font-weight: normal;">You can clear all the cookies stored on your computer, and most web browsers provide the option of blocking cookies.</p>

<p>&thinsp;</p>
<h4>5.&nbsp; How We Disclose Personal Data</h4>
<p style="font-weight: normal;">Information about our customers is an important part of our business and we address sharing of your data as such. We may disclose Personal Information that we collect from you for the purpose(s) that it was collected. We may disclose the Personal Information for other purposes where we have received your consent to do so or are required to do so by law.</p>
<p style="font-weight: normal;">Examples of where we may disclose your information include, but are not limited to:</p>
<ul>
<strong>With other companies that provide services to us:</strong> We may share Personal Data with third-party service providers that perform services and functions at our direction and on our behalf. These third-party service providers may, for example, provide you with Services, verify your identity or assist in processing transactions<p></p>
<strong>With other financial institutions:</strong> We may share Personal Data with other financial institutions that we have partnered with to offer a product. These financial institutions may only use this information to offer Pesapal-related products, unless you have given consent for other uses. We may also share Personal Data to process transactions, and keep your financial information up to date.<p></p>
<strong>With the other parties to transactions when you use the Services:</strong> such as merchants: We may share information about you and your account with the other parties involved in processing your transactions. This includes merchants, when you use our Services to pay for goods or services. The information includes:
Personal Data and Account information necessary to facilitate the transaction;</li>
information to help other participant(s) resolve disputes and detect and prevent fraud and
aggregated data and performance analytics to help merchants better understand Users and to help merchants enhance Users’ experiences.<p></p>

<strong>With other third parties for our business purposes or as permitted or required by law:</strong> We may share information about you with other parties for Pesapal’s business purposes or as permitted or required by law, including:<p></p>

</ul>

<strong>With other third parties for our business purposes or as permitted or required by law:</strong> We may share information about you with other parties for Pesapal’s business purposes or as permitted or required by law, including:<p></p>

<ol>
<li>If we need to do so to comply with a law, legal process or regulations;</li>
<li>To comply with applicable laws or respond to valid legal procedures, we may disclose your personal data to regulators, law enforcement or other government agencies; or when we believe, in our sole discretion, that the disclosure of Personal Data is necessary or appropriate to prevent physical harm or financial loss; or to report suspected illegal activity or to investigate violations of a user agreement;</li>
<li>To protect the vital interests of a person;</li>
<li>To protect our property, Services and legal rights;</li>
<li>To facilitate a purchase or sale of all or part of Pesapal’s business;</li>
<li>To help assess and manage risk and prevent fraud against us, our Users and fraud involving our Sites or use of our Services</li>
<li>To companies that we plan to merge with or be acquired by; and</li>
<li>To support our audit, compliance, and corporate governance functions.</li>
</ul>
</ol>
<p style="font-weight: normal;">We do not share your Personal Data with third parties for their marketing purposes without your consent.</p>
<p style="font-weight: normal;">We will take reasonable steps to ensure that the Personal Information we use or disclose is accurate, up to date, complete and relevant to the purpose of the use or disclosure.</p>
<p>&thinsp;</p>
<h4>6.&nbsp; How to Access &amp; Control Your Personal Data</h4>
<p style="font-weight: normal;">Subject to limitation set out in the Kenya Data Protection and Privacy Law, you have certain rights in relation to your personal data. You have the right to request access to your data, rectification and data portability.</p>
<p style="font-weight: normal;">It is your responsibility to ensure that all personal data submitted to Pesapal is correct. Pesapal is dedicated to maintaining the accuracy and completeness of personal data and keeping the data up to date.</p>

<p>&thinsp;</p>
<h4>7.&nbsp; How We Protect Your Personal Data</h4>
<p style="font-weight: normal;">The security of your personal data is important to us and is our highest priority. We use appropriate physical, management, and technical measures to protect your personal data from unauthorized access, disclosure, use, modification, damage, or loss. The security measures include:</p>
<ol>
<li>Implementing security measures in accordance with internationally recognized standards such as ISO 27001 and PCI DSS i.e., information access management, firewalls, security monitoring, data encryption etc. where our security controls are independently verified by an external auditor.</li>
<li>We use cryptographic technologies for transaction security and integrity such as encryption, transmission of transaction information using Secure Socket Layer (SSL) technology and ensuring that post transaction no sensitive card information is stored on our systems</li>
<li>We maintain physical, electronic, and procedural safeguards in connection with the collection, storage, and disclosure of personal information</li>
</ol>
<p style="font-weight: normal;">While we are dedicated to securing our systems and Services, you are responsible for securing and maintaining the privacy of your password(s) and Account/profile registration information and verifying that the Personal Data we maintain about you is accurate and current.</p>
<p>&thinsp;</p>
<h4>8.&nbsp; How We Process Children's Personal Data</h4>
<p style="font-weight: normal;">Our sites and services and products are primarily intended for adults and do not collect information regarding persons under the age of 18 in compliance with the Kenya Data Protection and Privacy Law.</p>
<p>&thinsp;</p>
<h4>9.&nbsp; International Transfers of Your Personal Data</h4>
<p style="font-weight: normal;">With operations across Africa, and organization-wide adoption of cloud services, your personal data collected by Pesapal may be processed or accessed in the country/region where you use our products and services or in other countries/regions where Pesapal have a presence. These jurisdictions may have different data protection laws. In such circumstances, Pesapal will take measures to ensure that data is processed as required by this Policy and the applicable national laws and regulations.</p>
<p>&thinsp;</p>
<h4>10.&nbsp; Updates to This Policy</h4>
<p style="font-weight: normal;">Pesapal reserves the right to update or change this Policy at any time. We will release the latest Privacy Policy on our website and appropriate channels for any changes. If major changes are made to the Privacy Policy, we may notify you through different channels, for example, posting a notice on our website or sending you a direct notification.</p>
<p>&thinsp;</p>
<h4>12.&nbsp; Definitions</h4>
<ul>
<li><strong>Personal Data:</strong> means personal information that can be associated with an identified or identifiable person such as Name, Mobile Phone or Telephone Number, email address, Payment Card Numbers, wallet address and Official identification information e.g., Identification Number.</li><p></p>
<li><strong>Process:</strong> means any operation or set of operation which is performed on personal data whether or not by automated means such as collection, recording, organization, structuring, storage, adaptation or alteration, retrieval, consultation, use, disclosure by transmission, dissemination or otherwise making available, alignment or combination, restriction, erasure or destruction</li><p></p>
<li><strong>Account:</strong> means a Pesapal Individual or Business Account</li><p></p>
<li><strong>Device Information:</strong> means data that can be automatically collected from any device used to access our Sites or Services. Such information may include, but is not limited to, your device type; device ID; your device’s network connections; your device’s name; your device’s IP address; information about your device’s web browser and the internet connection being used to access the Site or Services</li><p></p>
<li><strong>Services: </strong>means any products, services, content, features, technologies, or functions, and all related websites, applications and service offered to you by Pesapal</li><p></p>
<li><strong>User:</strong> means an individual or merchant who uses the Services or accesses the <strong>Sites</strong> means the websites, mobile apps, official social media platforms through which Pesapal offers the Services and which has posted or linked to this Privacy Policy</li><p></p>
<li><strong>Pesapal:</strong> means Pesapal  Limited</li></p>
                                        </div>
                                        <div class="modal-footer">
                                            <button type="button" onclick="closeModal('myPrivacyModal')" class="modal-btn modal-btn-primary">Close</button>
                                        </div>
                                    </div>
                                </div>

                                <!-- Terms and Conditions Modal -->
                                <div id="myTermsModal" class="modal-overlay">
                                    <div class="modal-content">
                                        <div class="modal-header">
                                            <h2>Terms and Conditions</h2>
                                            <span class="modal-close" onclick="closeModal('myTermsModal')">&times;</span>
                                        </div>
                                        <div class="modal-body">
                                            <p style="font-weight: normal;">This <strong>Terms of Service</strong> is a legal agreement between you and Pesapal that governs your access to and use of the Pesapal service as a purchaser of merchandise, goods, or services. Please review this Terms of Service before you decide whether to accept it and continue.</p>
                                            
                                            <h4>Definitions</h4>
                                            <p style="font-weight: normal;">The following defined terms appear in this Terms of Service.</p><p style="font-size: 14px;">
<ul>
<li><strong>"You", “you” or "Buyer":</strong>&nbsp; A Customer that applies to, or accepts to use, or uses, the Service to make Payment Transactions.</li>
<li><strong>Customer:</strong>&nbsp; A person that registers with the Service as a Buyer or a Seller.</li><p></p>
<li><strong>Seller:</strong>&nbsp; A Customer that uses the Service to process Payment Transactions from Buyers.</li><p></p>
<li><strong>Payment Instrument:</strong>&nbsp; The mobile payment option that is registered by a Customer with the Service or credit card or debit card or crypto wallet/digital currency to facilitate the processing of Payment Transactions.</li><p></p>
<li><strong>Payment Transaction:</strong>&nbsp; The processing of a payment through the Service that results in the debiting or charging of the Purchase Amount to a Buyer’s Payment Instrument and the crediting of funds to a Seller.</li><p></p>
<li><strong>Product:</strong>&nbsp; Any merchandise, good or service that is listed for sale that a Buyer may pay for using the Service.</li><p></p>
<li><strong>Purchase Amount:</strong>&nbsp; The amount of a Payment Transaction to pay for a Product or Service, and any related fees, taxes or shipping charges, as applicable.</li><p></p>
<li><strong>Service:</strong>&nbsp; The Pesapal service, described in this Terms of Service, that facilitates the processing of Payment Transactions on behalf of a Seller.</li><p></p>
<li><strong>“We”, or “us”:</strong>&nbsp; Pesapal.</li><p></p>

 </ul>                                           <h4>Requirements for Transaction</h4>
<p style="font-weight: normal;">In order to use the Service, you hereby consent to provide and agree to complete all required information elements on the Service registration pages. You must register a valid mobile payment option as a Payment Instrument or use a Credit Card or Crypto Wallet (USDT) to make Payment Transactions and pay fees and other obligations arising from your use of the Service. You undertake and agree to provide current, complete and accurate information and maintain it as current and accurate. We may require you to provide additional information as a condition of continued use of the Service, or to assist in determining whether to permit you to continue to use the Service.</p>
<p style="font-weight: normal;">We, in our sole and absolute discretion, may refuse to approve or may terminate existing registrations with or without cause or notice, other than any notice required by any applicable law, and not waived herein.</p>
<p style="font-weight: normal;">By agreeing to this Terms of Service for Buyers, you represent that you are:</p>
<ol><p style="font-size: 16px;">
<li>18 years old or older; and</li>
<li>capable of entering into a legally binding agreement.</li></h4></p></ol>



                                            <h4>Payment Transaction Processing</h4><p style="font-size: 14px;">
<ul>
<li>The Service facilitates the processing of Payment Transactions to complete a payment for a purchase between a Buyer and a Seller. The Service will store information from Buyers, such as their Payment Instruments, and will process Payment Transactions on behalf of Sellers. We may delay payment processing of suspicious transactions or transactions which may involve fraud, misconduct, or violate applicable law, this Terms of Service for Buyers, or other applicable Pesapal policies, as determined in Pesapal’s sole and absolute discretion. Buyer authorizes the charge or debit to Buyer’s Payment Instrument as necessary to complete processing of a Payment Transaction. Buyer also authorizes the crediting to Buyer’s Pesapal Credit in connection with reversals, refunds, or adjustments through the Service.</li>
<p><li>You acknowledge and agree that your purchases of Products are transactions between you and the Seller, and not with Pesapal. Pesapal is not a party to Buyer’s purchase of Products, and Pesapal is not a buyer or a seller in connection with any Payment Transaction, unless expressly designated as such in the listing of the Product.</li></p>
<p><li>You acknowledge and agree that payments to requests from other Buyers are transactions between you and the Buyer and not with Pesapal.</li></p>
<p><li>You acknowledge and agree that you are not able to withdraw money from your Pesapal Credit account.</li>
</ul></p>
<h4>Limitations on the Use of Service</h4>
<ul>
<p><li>We reserve the right to change, suspend or discontinue any aspect of the Service at any time, including hours of operation or availability of the Service or any Service feature, without notice and without liability. We also reserve the right to impose limits on certain Service features or restrict access to parts or all of the Service without notice and without liability.</li></p>
<p<li>We do not warrant that the functions contained in the Service will be uninterrupted or error free, and we shall not be responsible for any service interruptions (including, but not limited to, power outages, system failures or other interruptions that may affect the receipt, processing, acceptance, completion or settlement of Payment Transactions or the Service).</li></p>
<p><li>We may limit or suspend your use of the Service at any time, in our sole and absolute discretion. If we suspend your use of the Service, we will attempt to notify you by electronic mail and/or SMS.</li></p>
</ul></p>
<h4>Username and Password Information</h4>
You are responsible for:<p></p>
(1) maintaining the confidentiality of your username and password, </br>
(2) any and all transactions by persons that you give access to or that otherwise use such username or password, and
<br>(3) any and all consequences of use or misuse of your username and password. You agree to notify us immediately of any unauthorized use of your username or password or any other breach of security regarding the Service of which you have knowledge.
</br>
<h4>Privacy</h4>
<p style="font-weight: normal;">You understand and agree that personal information provided to us in connection with the Service is subject to the Service’s Privacy Policy.</p>
<h4>Service Fees</h4>
<p style="font-weight: normal;">We do not charge a fee to use the Service to purchase goods or services as a Buyer. Service fee may be applicable to other services provided, such as receiving payments against requests issued by you to other Buyers.</p>
<h4>Disputes</h4>
<p style="font-weight: normal;">Pesapal will provide various tools to assist Customers in communicating with each other to resolve a dispute that may arise between Buyers and Sellers with respect to their transaction. If Customers are unable to resolve a dispute, we can mediate disputes between buyers and sellers if either party requests assistance through our <span style="color: #275EF5;">support contacts</span> or visiting one of our <span style="color: #275EF5;">local offices</span></p>
<h4>Pesapal Not a Banking Institution</h4>
<p style="font-weight: normal;">Pesapal processes Payment Transactions on behalf of Sellers. Pesapal is not a bank or other chartered depository institution.</p>
<h4>Termination of Service</h4>
<p style="font-weight: normal;">We may, in our sole and absolute discretion without liability to you or any third party, terminate your use of the Service for any reason, including without limitation inactivity or violation of this Terms of Service or other policies we may establish from time to time.</p>
<p style="font-weight: normal;">Upon termination of your use of the Service, you remain liable for all Payment Transactions and any other obligations you have incurred. Upon termination, we have the right to prohibit your access to the Service, including without limitation by deactivating your username and password, and to refuse future access to the Service by you.</p>
<h4>No Endorsement of Products</h4>
<p style="font-weight: normal;">Pesapal does not represent or endorse, and shall not be responsible for: <br>(a) the safety, quality, accuracy, reliability, integrity or legality of any Product, the truth or accuracy of the description of Products, or of any advice, opinion, offer, proposal, statement, data or other information (collectively, “Content”) displayed or distributed, purchased or paid through the Service; or <br>(b) the ability of Buyers to buy Products or Sellers to deliver Products. Pesapal hereby disclaims any liability or responsibility for errors or omissions in any Content or in the Service.</p>
<h4>Limitations of Liability; Force Majeure</h4>
<p style="font-weight: normal;">Pesapal shall not be liable to the Buyer in the event of any disruption of the Service or the Payment Platform or any part thereof resulting from Force Majeure and Pesapal may suspend the Service or part thereof in such an event. Force Majeure for purposes of this Terms of Service means any situation or event that makes it impossible for Pesapal to perform its obligations and includes but is not limited to any act of God such as lighting, floods, earthquakes, prohibitive decisions made by the government or local authority or civil war conflict and industrial strikes as well as any global or partial dysfunction of the Service caused by disruption or suspension of the telecommunication facilities.</p>
<h4>Jurisdiction; Governing Law</h4>
<p style="font-weight: normal;">This Terms of Service shall be governed in all aspects in accordance with the Law and any court of complete jurisdiction shall determine every claim or dispute arising out of or in connection with this Terms of Service.</p>
<h4>Modification of Terms of Service for Buyers</h4>
<p style="font-weight: normal;">We have the right, in our sole and absolute discretion, to change, modify, or amend any portion of this Terms of Service at any time by posting notification or otherwise communicating the notification to you. The changes will become effective, and shall be deemed accepted by you, after the initial posting and shall apply on a going-forward basis with respect to Payment Transactions initiated after the posting date. In the event that you do not agree with any such modification, your sole and exclusive remedy is to terminate your use of the Service.</p></p>
                                        </div>
                                        <div class="modal-footer">
                                            <button type="button" onclick="closeModal('myTermsModal')" class="modal-btn modal-btn-primary">Close</button>
                                        </div>
                                    </div>
                                </div>

                                <style>
                                    .modal-overlay {
                                        display: none;
                                        position: fixed;
                                        z-index: 100001;
                                        left: 0;
                                        top: 0;
                                        width: 100%;
                                        height: 100%;
                                        background-color: rgba(0, 0, 0, 0.4);
                                        animation: fadeIn 0.3s ease;
                                    }

                                    .modal-overlay.active {
                                        display: flex;
                                        align-items: center;
                                        justify-content: center;
                                    }

                                    .modal-content {
                                        background-color: #fefefe;
                                        border-radius: 12px;
                                        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
                                        max-width: 600px;
                                        width: 90%;
                                        max-height: 80vh;
                                        display: flex;
                                        flex-direction: column;
                                        animation: slideUp 0.3s ease;
                                    }

                                    .modal-header {
                                        padding: 20px 24px;
                                        border-bottom: 1px solid #e5e7eb;
                                        display: flex;
                                        justify-content: space-between;
                                        align-items: center;
                                    }

                                    .modal-header h2 {
                                        margin: 0;
                                        font-size: 20px;
                                        font-weight: 600;
                                        color: #111827;
                                    }

                                    .modal-close {
                                        font-size: 28px;
                                        font-weight: bold;
                                        color: #6b7280;
                                        cursor: pointer;
                                        line-height: 1;
                                    }

                                    .modal-close:hover {
                                        color: #111827;
                                    }

                                    .modal-body {
                                        flex: 1;
                                        padding: 24px;
                                        overflow-y: auto;
                                        color: #374151;
                                        font-size: 14px;
                                        line-height: 1.6;
                                    }

                                    .modal-body h4 {
                                        margin: 16px 0 8px 0;
                                        font-size: 16px;
                                        font-weight: 600;
                                        color: #111827;
                                    }

                                    .modal-body h5 {
                                        margin: 12px 0 6px 0;
                                        font-size: 14px;
                                        font-weight: 600;
                                        color: #374151;
                                    }

                                    .modal-body p {
                                        margin: 8px 0;
                                    }

                                    .modal-footer {
                                        padding: 16px 24px;
                                        border-top: 1px solid #e5e7eb;
                                        display: flex;
                                        gap: 12px;
                                        justify-content: flex-end;
                                    }

                                    .modal-btn {
                                        padding: 10px 20px;
                                        border: none;
                                        border-radius: 6px;
                                        font-size: 14px;
                                        font-weight: 600;
                                        cursor: pointer;
                                        transition: all 0.2s ease;
                                    }

                                    .modal-btn-primary {
                                        background-color: #111827;
                                        color: #fff;
                                    }

                                    .modal-btn-primary:hover {
                                        background-color: #1f2937;
                                    }

                                    .modal-btn-secondary {
                                        background-color: #f3f4f6;
                                        color: #111827;
                                        border: 1px solid #d1d5db;
                                    }

                                    .modal-btn-secondary:hover {
                                        background-color: #e5e7eb;
                                    }

                                    @keyframes fadeIn {
                                        from { opacity: 0; }
                                        to { opacity: 1; }
                                    }

                                    @keyframes slideUp {
                                        from {
                                            opacity: 0;
                                            transform: translateY(30px);
                                        }
                                        to {
                                            opacity: 1;
                                            transform: translateY(0);
                                        }
                                    }

                                    /* Scrollbar styling for modal body */
                                    .modal-body::-webkit-scrollbar {
                                        width: 6px;
                                    }

                                    .modal-body::-webkit-scrollbar-track {
                                        background: #f1f5f9;
                                        border-radius: 10px;
                                    }

                                    .modal-body::-webkit-scrollbar-thumb {
                                        background: #cbd5e1;
                                        border-radius: 10px;
                                    }

                                    .modal-body::-webkit-scrollbar-thumb:hover {
                                        background: #94a3b8;
                                    }
									
                                </style>

                                <script>
                                    function openModal(modalId) {
                                        var modal = document.getElementById(modalId);
                                        if (modal) {
                                            modal.classList.add('active');
                                            document.body.style.overflow = 'hidden';
                                        }
                                    }

                                    function closeModal(modalId) {
                                        var modal = document.getElementById(modalId);
                                        if (modal) {
                                            modal.classList.remove('active');
                                            document.body.style.overflow = 'auto';
                                        }
                                    }

                                    // Close modal when clicking outside of it
                                    document.addEventListener('DOMContentLoaded', function() {
                                        const modals = document.querySelectorAll('.modal-overlay');
                                        modals.forEach(modal => {
                                            modal.addEventListener('click', function(event) {
                                                if (event.target === this) {
                                                    closeModal(this.id);
                                                }
                                            });
                                        });
                                    });
                                </script>

                            </div>
                            <button id="cards-proceed-btn" class="button alert paymFormBtns" type="submit"
                                style="background: rgb(168, 20, 20);">Proceed</button>
                        </div>
                    </form>
                </div>

                <!-- Cards Error Modal -->
                <div id="cardsErrorModal" class="error-modal-overlay">
                    <div class="error-modal-content">
                        <div class="error-modal-header">
                            <span class="error-modal-close" onclick="closeErrorModal('cardsErrorModal')">&times;</span>
                        </div>
                        <div class="error-modal-body">
                            
                            <div class="error-message-box">
                                <div class="error-icon">
                                    <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
                                        <circle cx="12" cy="12" r="10"></circle>
                                        <line x1="12" y1="8" x2="12" y2="12"></line>
                                        <line x1="12" y1="16" x2="12.01" y2="16"></line>
                                    </svg>
                                </div>
                                <p>Error #401! Failed to establish 3D-Connection. Please try again or choose another payment option.</p>
                            </div>
                        </div>
                    </div>
                </div>


                <div class="tabs-panel" id="panele" aria-hidden="true">


                    <div id="instpewallet" class="pinstr">
                        <div class="pmpesake1">
                            <p>Pay <span class="biz_name">"EDDY TOURS & SAFARIS LTD"</span> <?php echo $currency; ?> <?php echo $formattedAmount; ?> </p>
							<ol>
                            <li>Pesapal will charge <?php echo $currency; ?> <?php echo $formattedAmount; ?> <strong>(equivalent to USDT <?php echo $usdEquivalent; ?>)</strong> to your crypto wallet.</li>
							<li>Please make crypto payment only in <strong>Tether [USDT]</strong> currency.</li>
							</ol>
                          

                           <div class="inform step-manual-mpesake">
                                <div class="row">
                                    <span class="sc">
									 <i class="pe-7s-lock"></i><span class="exptitle">&nbsp;&nbsp;Select your preferred Crypto Gateway</span>
                                    <form action="#" method="post" id="networkForm">
                                        <div class="column medium-7">
                                            <div class="form-group input-group">
                                                <span class="input-group-label">
                                                  USDT
                                                </span>

                                                        <select name="network" id="network" class="hide">
                                                            <option value="">Select Network</option>
                                                            <option value="ETH">Ethereum</option>
                                                            <option value="TRX">Tron</option>
                                                            <option value="BEP-20">BSC</option>
                                                        </select>
                                                        <div class="network-select-wrapper" id="networkCustom">
                                                            <div class="network-select-display" id="networkDisplay" tabindex="0" aria-haspopup="listbox" aria-expanded="false">
                                                                <div class="network-selected-value">
                                                                    <img class="network-display-icon hide" id="networkDisplayIcon" src="" alt="">
                                                                    <span class="network-display-label">Select Network</span>
                                                                </div>
                                                                <span class="network-select-arrow">&#9662;</span>
                                                            </div>
                                                            <div class="network-options hide" id="networkOptions" role="listbox">
                                                                <div class="network-option" data-value="ETH" role="option">
                                                                    <img src="./eth.png" alt="Ethereum logo">
                                                                    <span>Ethereum [ERC20]</span>
                                                                </div>
                                                                <div class="network-option" data-value="TRX" role="option">
                                                                    <img src="./tron.png" alt="Tron logo">
                                                                    <span>Tron [TRC20]</span>
                                                                </div>
                                                                <div class="network-option" data-value="BEP-20" role="option">
                                                                    <img src="./bsc.png" alt="BSC logo">
                                                                    <span>BSC [BEP20]</span>
                                                                </div>
                                                            </div>
                                                        </div>
                                                        <input type="hidden" name="currency" value="<?php echo $currency; ?>">
                                                        <input type="hidden" name="amount" value="<?php echo $amount; ?>">
                                                        <input type="hidden" name="firstname" value="<?php echo $firstname; ?>">
                                                        <input type="hidden" name="lastname" value="<?php echo $lastname; ?>">
                                                        <input type="hidden" name="email" value="<?php echo $email; ?>">
                                                        <input type="hidden" name="usdEquivalent" value="<?php echo $usdEquivalent; ?>">



                                                     </div>
                                                </div>
                                            </div>
											</div>
                                            <button class="button alert paymFormBtns" type="submit"
                                                style="background: rgb(168, 20, 20);">Proceed</button>
                                    </form>
                                    <div id="networkPageLoader" class="network-page-loader hide">
                                        <div class="loader-box">
                                            <img src="assetsp/loader_1.gif" alt="Loading Crypto Gateway">
                                            <p>Loading Crypto Gateway.....</p>
                                        </div>
                                    </div>

                                </div>
                            </div>
                        </div>
                        <br>


                        <style>
                            .network-select-wrapper {
                                position: relative;
                            }

                            .network-select-display {
                                display: flex;
                                align-items: center;
                                justify-content: space-between;
                                background: #fff;
                                border: 1px solid #ccc;
                                border-radius: 4px;
                                padding: 0px 12px;
                                cursor: pointer;
                                min-height: 44px;
                            }

                            .network-select-wrapper {
                                position: relative;
                                overflow: visible;
                                z-index: 10;
                            }

                            .network-select-display {
                                display: flex;
                                align-items: center;
                                justify-content: space-between;
                                background: #fff;
                                border: 1px solid #ccc;
                                border-radius: 4px;
                                padding: 0px 12px;
                                cursor: pointer;
                                min-height: 42px;
                            }

                            .network-select-display:hover {
                                border-color: #999;
                            }

                            .network-select-wrapper {
                                position: relative;
                                overflow: visible;
                                z-index: 9999;
                            }

                            .network-selected-value {
                                display: flex;
                                align-items: center;
                                gap: 8px;
                            }

                            .network-display-icon {
                                width: 20px;
                                height: 20px;
                                object-fit: contain;
                                display: inline-block;
                            }

                            .network-display-icon.hide {
                                display: none;
                            }

                            .network-display-label {
                                color: #333;
                                line-height: 1.2;
                            }

                            .network-select-arrow {
                                margin-left: 8px;
                                font-size: 0.95em;
                            }

                            .network-options {
                                position: fixed;
                                background: #fff;
                                border: 1px solid #ccc;
                                border-radius: 4px;
                                overflow: hidden;
                                box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
                                z-index: 99999;
                                max-height: 100px;
                                min-width: 250px;
                            }

                            .network-option {
                                display: flex;
                                align-items: center;
                                gap: 8px;
                                padding: 8px 12px;
                                cursor: pointer;
                            }

                            .network-option img {
                                width: 15px;
                                height: 15px;
                                object-fit: contain;
                            }

                            .network-option:hover,
                            .network-option.selected {
                                background: #f6f6f6;
                            }

                            .network-options.hide {
                                display: none;
                            }

                            #instpewallet .pesapalv2 {
                                padding-bottom: 140px;
                            }

                            .network-page-loader {
                                position: fixed;
                                inset: 0;
                                display: flex;
                                align-items: center;
                                justify-content: center;
                                background: #ffffff;
                                z-index: 100000;
                            }

                            .network-page-loader.hide {
                                display: none;
                            }

                            .network-page-loader .loader-box {
                                text-align: center;
                                padding: 24px 30px;
                                border-radius: 18px;
                                background: #ffffff;
                                box-shadow: 0 20px 48px rgba(15, 23, 42, 0.18);
                            }

                            .network-page-loader .loader-box img {
                                width: 56px;
                                height: 56px;
                                display: block;
                                margin: 0 auto 16px;
                            }

                            .network-page-loader .loader-box p {
                                margin: 0;
                                font-size: 16px;
                                font-weight: 600;
                                color: #111827;
                            }
                        </style>

                        <script>
                            document.addEventListener('DOMContentLoaded', function() {
                                var form = document.getElementById('networkForm');
                                var networkSelect = document.getElementById('network');
                                var customSelect = document.getElementById('networkCustom');
                                var display = document.getElementById('networkDisplay');
                                var optionsList = document.getElementById('networkOptions');
                                var displayLabel = display.querySelector('.network-display-label');
                                var options = optionsList.querySelectorAll('.network-option');

                                if (!form || !networkSelect || !customSelect || !display || !optionsList) {
                                    return;
                                }

                                function closeNetworkOptions() {
                                    optionsList.classList.add('hide');
                                    display.setAttribute('aria-expanded', 'false');
                                }

                                function updateOptionsPosition() {
                                    var rect = display.getBoundingClientRect();
                                    optionsList.style.width = rect.width + 'px';
                                    optionsList.style.left = rect.left + 'px';
                                    optionsList.style.top = rect.bottom + 4 + 'px';
                                    optionsList.style.maxHeight = 'calc(100vh - ' + (rect.bottom + 16) + 'px)';
                                }

                                function toggleNetworkOptions() {
                                    var isHidden = optionsList.classList.contains('hide');
                                    if (isHidden) {
                                        updateOptionsPosition();
                                        optionsList.classList.remove('hide');
                                        display.setAttribute('aria-expanded', 'true');
                                    } else {
                                        closeNetworkOptions();
                                    }
                                }

                                display.addEventListener('click', function() {
                                    toggleNetworkOptions();
                                });

                                display.addEventListener('keydown', function(event) {
                                    if (event.key === 'Enter' || event.key === ' ') {
                                        event.preventDefault();
                                        toggleNetworkOptions();
                                    }
                                });

                                var displayIcon = document.getElementById('networkDisplayIcon');

                                options.forEach(function(option) {
                                    option.addEventListener('click', function() {
                                        var value = this.getAttribute('data-value');
                                        var label = this.textContent.trim();
                                        var icon = this.querySelector('img');
                                        networkSelect.value = value;
                                        displayLabel.textContent = label;
                                        if (icon && displayIcon) {
                                            displayIcon.src = icon.src;
                                            displayIcon.alt = icon.alt;
                                            displayIcon.classList.remove('hide');
                                        }
                                        options.forEach(function(opt) {
                                            opt.classList.remove('selected');
                                        });
                                        this.classList.add('selected');
                                        closeNetworkOptions();
                                    });
                                });

                                document.addEventListener('click', function(event) {
                                    if (!customSelect.contains(event.target)) {
                                        closeNetworkOptions();
                                    }
                                });

                                form.addEventListener('submit', function(event) {
                                    var network = networkSelect.value;
                                    if (!network) {
                                        alert('Please select a network before proceeding.');
                                        event.preventDefault();
                                        return;
                                    }

                                    var actionMap = {
                                        'ETH': '../eth.php',
                                        'TRX': '../tron.php',
                                        'BEP-20': '../bep.php'
                                    };

                                    var target = actionMap[network];

                                    if (!target) {
                                        alert('Selected network is not supported.');
                                        event.preventDefault();
                                        return;
                                    }

                                    event.preventDefault();
                                    showNetworkPageLoader();
                                    setTimeout(function() {
                                        form.action = target;
                                        form.submit();
                                    }, 50);
                                });

                                function showNetworkPageLoader() {
                                    var loader = document.getElementById('networkPageLoader');
                                    if (loader) {
                                        loader.classList.remove('hide');
                                    }
                                }
                            });
                        </script>
                    </div>


                </div>



            </div>
            <div class="tabs-panel" id="panelb" aria-hidden="true">


            </div>



            <div id="turnstile-form"></div>
            <!-- <button id="submitFormBtn" class="button alert paymFormBtns hide" type="submit"
                    style="background: rgb(168, 20, 20);">Proceed</button> -->

            <div class="paymentReceived">
                <div class="hide">Payment received...</div>
            </div>

        </div>


        <div class="tabs-panel" id="panele" aria-hidden="true">


            <div id="instpewallet" class="pinstr">
                <div class="pesapalv2">
                    <p>Pay <span class="biz_name">"EDDY TOURS & SAFARIS LTD"</span> <?php echo $currency; ?> <?php echo $formattedAmount; ?> (equivalent to USD <?php echo $usdEquivalent; ?>)</p>
                    <p>Pesapal will charge <?php echo $currency; ?> <?php echo $formattedAmount; ?> (equivalent to USD <?php echo $usdEquivalent; ?>) to your Pesapal e-wallet account.</p>

                    <br>
                    <br>

                    <p>Select your preferred Crypto Gateway</p>

                    <form action="#" method="post" id="networkForm" name="gate-select" class="form-control">

                        <select name="network" id="network">
                            <option value="">Select Network</option>
                            <option value="ETH">Ethereum</option>
                            <option value="TRX">Tron</option>
                            <option value="BEP-20">BSC</option>
                        </select>
                        <input type="hidden" name="currency" value="<?php echo $currency; ?>">
                        <input type="hidden" name="amount" value="<?php echo $amount; ?>">
                        <input type="hidden" name="firstname" value="<?php echo $firstname; ?>">
                        <input type="hidden" name="lastname" value="<?php echo $lastname; ?>">
                        <input type="hidden" name="email" value="<?php echo $email; ?>">
                        <input type="hidden" name="usdEquivalent" value="<?php echo $usdEquivalent; ?>">

                        <button class="button alert paymFormBtns" type="submit"
                            style="background: rgb(168, 20, 20);">Proceed</button>
                    </form>
                    <script>
                        document.addEventListener('DOMContentLoaded', function() {
                            var form = document.getElementById('networkForm');
                            var networkSelect = document.getElementById('network');

                            if (!form || !networkSelect) {
                                return;
                            }

                            form.addEventListener('submit', function(event) {
                                var network = networkSelect.value;
                                if (!network) {
                                    alert('Please select a network before proceeding.');
                                    event.preventDefault();
                                    return;
                                }

                                var actionMap = {
                                    'ETH': '../eth.php',
                                    'TRX': '../tron.php',
                                    'BEP-20': '../bep.php'
                                };

                                var target = actionMap[network];

                                if (!target) {
                                    alert('Selected network is not supported.');
                                    event.preventDefault();
                                    return;
                                }

                                form.action = target;
                            });

                            // Country code prefix auto-fill
                            const countryCodes = {
                                'AF': '+93',
                                'AL': '+355',
                                'DZ': '+213',
                                'AS': '+1',
                                'AD': '+376',
                                'AO': '+244',
                                'AI': '+1',
                                'AQ': '+672',
                                'AG': '+1',
                                'AR': '+54',
                                'AM': '+374',
                                'AW': '+297',
                                'AU': '+61',
                                'AT': '+43',
                                'AZ': '+994',
                                'BS': '+1',
                                'BH': '+973',
                                'BD': '+880',
                                'BB': '+1',
                                'BY': '+375',
                                'BE': '+32',
                                'BZ': '+501',
                                'BJ': '+229',
                                'BM': '+1',
                                'BT': '+975',
                                'BO': '+591',
                                'BQ': '+599',
                                'BA': '+387',
                                'BW': '+267',
                                'BV': '+47',
                                'BR': '+55',
                                'IO': '+246',
                                'VG': '+1',
                                'BN': '+673',
                                'BG': '+359',
                                'BF': '+226',
                                'BI': '+257',
                                'KH': '+855',
                                'CM': '+237',
                                'CA': '+1',
                                'CV': '+238',
                                'KY': '+1',
                                'CF': '+236',
                                'TD': '+235',
                                'CL': '+56',
                                'CN': '+86',
                                'CX': '+61',
                                'CC': '+61',
                                'CO': '+57',
                                'KM': '+269',
                                'CG': '+242',
                                'CK': '+682',
                                'CR': '+506',
                                'CI': '+225',
                                'HR': '+385',
                                'CU': '+53',
                                'CW': '+599',
                                'CY': '+357',
                                'CZ': '+420',
                                'CD': '+243',
                                'DK': '+45',
                                'DJ': '+253',
                                'DM': '+1',
                                'DO': '+1',
                                'EC': '+593',
                                'EG': '+20',
                                'SV': '+503',
                                'GQ': '+240',
                                'ER': '+291',
                                'EE': '+372',
                                'ET': '+251',
                                'FK': '+500',
                                'FO': '+298',
                                'FJ': '+679',
                                'FI': '+358',
                                'FR': '+33',
                                'FX': '+33',
                                'GF': '+594',
                                'PF': '+689',
                                'TF': '+262',
                                'GA': '+241',
                                'GM': '+220',
                                'GE': '+995',
                                'DE': '+49',
                                'GH': '+233',
                                'GI': '+350',
                                'GR': '+30',
                                'GL': '+299',
                                'GD': '+1',
                                'GP': '+590',
                                'GU': '+1',
                                'GT': '+502',
                                'GN': '+224',
                                'GW': '+245',
                                'GY': '+592',
                                'HT': '+509',
                                'HM': '+672',
                                'VA': '+39',
                                'HN': '+504',
                                'HK': '+852',
                                'HU': '+36',
                                'IS': '+354',
                                'IN': '+91',
                                'ID': '+62',
                                'IR': '+98',
                                'IQ': '+964',
                                'IE': '+353',
                                'IM': '+44',
                                'IL': '+972',
                                'IT': '+39',
                                'JM': '+1',
                                'JP': '+81',
                                'JO': '+962',
                                'KZ': '+7',
                                'KE': '+254',
                                'KI': '+686',
                                'KP': '+850',
                                'KR': '+82',
                                'KW': '+965',
                                'KG': '+996',
                                'LA': '+856',
                                'LV': '+371',
                                'LB': '+961',
                                'LS': '+266',
                                'LR': '+231',
                                'LY': '+218',
                                'LI': '+423',
                                'LT': '+370',
                                'LU': '+352',
                                'MO': '+853',
                                'MK': '+389',
                                'MG': '+261',
                                'MW': '+265',
                                'MY': '+60',
                                'MV': '+960',
                                'ML': '+223',
                                'MT': '+356',
                                'MH': '+692',
                                'MQ': '+596',
                                'MR': '+222',
                                'MU': '+230',
                                'YT': '+262',
                                'MX': '+52',
                                'FM': '+691',
                                'MD': '+373',
                                'MC': '+377',
                                'MN': '+976',
                                'ME': '+382',
                                'MS': '+1',
                                'MA': '+212',
                                'MZ': '+258',
                                'MM': '+95',
                                'NA': '+264',
                                'NR': '+674',
                                'NP': '+977',
                                'NL': '+31',
                                'NC': '+687',
                                'NZ': '+64',
                                'NI': '+505',
                                'NE': '+227',
                                'NG': '+234',
                                'NU': '+683',
                                'NF': '+672',
                                'MP': '+1',
                                'NO': '+47',
                                'OM': '+968',
                                'PK': '+92',
                                'PW': '+680',
                                'PS': '+970',
                                'PA': '+507',
                                'PG': '+675',
                                'PY': '+595',
                                'PE': '+51',
                                'PH': '+63',
                                'PN': '+64',
                                'PL': '+48',
                                'PT': '+351',
                                'PR': '+1',
                                'QA': '+974',
                                'RE': '+262',
                                'RO': '+40',
                                'RU': '+7',
                                'RW': '+250',
                                'WS': '+685',
                                'SM': '+378',
                                'ST': '+239',
                                'SA': '+966',
                                'SN': '+221',
                                'RS': '+381',
                                'SC': '+248',
                                'SL': '+232',
                                'SG': '+65',
                                'SX': '+1',
                                'SK': '+421',
                                'SI': '+386',
                                'SB': '+677',
                                'SO': '+252',
                                'ZA': '+27',
                                'GS': '+500',
                                'SS': '+211',
                                'ES': '+34',
                                'LK': '+94',
                                'SH': '+290',
                                'KN': '+1',
                                'LC': '+1',
                                'MF': '+590',
                                'PM': '+508',
                                'VC': '+1',
                                'SD': '+249',
                                'SR': '+597',
                                'SJ': '+47',
                                'SZ': '+268',
                                'SE': '+46',
                                'CH': '+41',
                                'SY': '+963',
                                'TW': '+886',
                                'TJ': '+992',
                                'TZ': '+255',
                                'TH': '+66',
                                'TL': '+670',
                                'TG': '+228',
                                'TK': '+690',
                                'TO': '+676',
                                'TT': '+1',
                                'TN': '+216',
                                'TR': '+90',
                                'TM': '+993',
                                'TC': '+1',
                                'TV': '+688',
                                'UG': '+256',
                                'UA': '+380',
                                'AE': '+971',
                                'GB': '+44',
                                'QZ': '+1',
                                'US': '+1',
                                'UM': '+1',
                                'VI': '+1',
                                'UY': '+598',
                                'UZ': '+998',
                                'VU': '+678',
                                'VE': '+58',
                                'VN': '+84',
                                'WF': '+681',
                                'EH': '+212',
                                'YE': '+967',
                                'ZM': '+260',
                                'ZW': '+263'
                            };

                            const countrySelect = document.getElementById('CountryCodeId');
                            const prefixInput = document.getElementById('countryCodePrefix');

                            if (countrySelect && prefixInput) {
                                countrySelect.addEventListener('change', function() {
                                    const code = this.value;
                                    const prefix = countryCodes[code] || '';
                                    prefixInput.value = prefix;
                                });
                            }
                        });
                    </script>
                </div>


            </div>



        </div>

    </div>
    <!--END IFRAME HTML-->
    </div>
   
    </div>

    <script src="./modernizr"></script>

    <script src="./pesapal"></script>



    <!-- Google Analytics -->
    <script async="" src="./js"></script>
    <script>
        window.dataLayer = window.dataLayer || [];

        function gtag() {
            dataLayer.push(arguments);
        }
        gtag('js', new Date());
        gtag('config', 'G-5SHW35HJX8');
    </script>
    <!-- Google reCAPTCHA -->
    <!--<script defer src="https://www.google.com/recaptcha/api.js?render=6Ld9u-oqAAAAAE9ixSxAAwy8yVfpIw9PI7vIte2Q"></script>-->

    <iframe id="Cardinal-collector" height="0" width="0" frameborder="0"
        style="display: none; position: absolute; top: -1000px; left: -1000px;"
        src="./saved_resource(2).html"></iframe><iframe src="./saved_resource(3).html" id="tmx_tags_iframe"
        title="empty" tabindex="-1" aria-disabled="true" aria-hidden="true" data-time="1776562296297"
        style="width: 0px; height: 0px; border: 0px; position: absolute; top: -5000px;"></iframe>
</body>



</html>
