JFIF$        dd7 

Viewing File: /home/optimaldigitaltr/public_html/src/storage/framework/views/83e9977b373be779e0759b45bdf43db1.php

<?php $__env->startSection('content'); ?>
    <div class="main-content" data-simplebar>
        <div class="i-card-sm">
            <div class="row">
                <div class="user-form">
                    <h5 class="card-header text-center"><?php echo e(__('Payment Details')); ?></h5>

                    <!-- Timer Display -->
                    <div class="card-body mb-4 mt-2">
                        <div id="payment-timer" style="text-align: center; margin-bottom: 20px;">
                            <h4><?php echo e(__('Time Remaining:')); ?> <span id="timer">30:00</span></h4>
                        </div>

                        <?php echo $gateway->details ?? '' ?>
                        
                        <center>
                            <img src="https://www.bitcoinqrcodemaker.com/api/?style=<?php echo e($gateway->name); ?>&address=<?php echo e($gateway->wallet); ?>" alt="QR Code" style="max-width: 200px; margin-bottom: 10px;">
                        </center>

                        <div class="crypto-wallet-container" style="max-width: 500px; margin: 0 auto; text-align: center;">
                            <div class="input-group">
                                <input
                                    type="text"
                                    id="cryptoWalletAddress"
                                    class="form-control"
                                    value="<?php echo e($gateway->wallet ?? 'No Wallet Address Available'); ?>"
                                    readonly
                                />
                                <button
                                    class="btn btn-primary"
                                    id="copyWalletButton"
                                    onclick="copyWalletAddress()"
                                >
                                    Copy
                                </button>
                            </div>
                            <small id="copyStatus" style="display: none; color: green; margin-top: 5px;">Copied to clipboard!</small>
                        </div>
                    </div>

                    <?php if($gateway->type == \App\Enums\Payment\GatewayType::AUTOMATIC->value && $gateway->code == \App\Enums\Payment\GatewayCode::BLOCK_CHAIN->value): ?>
                        <div class="card-body card-body-deposit text-center">
                            <h4 class="my-2"> <?php echo app('translator')->get('PLEASE SEND EXACTLY'); ?> <span class="text-success"> <?php echo e($payment->btc_amount); ?></span> <?php echo app('translator')->get('BTC'); ?></h4>
                            <h5 class="mb-2"><?php echo app('translator')->get('TO'); ?> <span class="text-success"> <?php echo e($payment->btc_wallet ?? ''); ?></span></h5>
                            <img src="<?php echo e(cryptoQRCode($payment->btc_wallet ?? '')); ?>" alt="<?php echo app('translator')->get('Image'); ?>">
                            <h4 class="text-white bold my-4"><?php echo app('translator')->get('SCAN TO SEND'); ?></h4>
                        </div>
                    <?php endif; ?>

                    <?php if($gateway->type == \App\Enums\Payment\GatewayType::MANUAL->value): ?>
                        <div class="col-lg-12 mb-4">
                            <ul class="list-group">
                               
                                <li class="list-group-item d-flex justify-content-between align-items-center">
                                    <?php echo e(__('Deposit Amount')); ?>

                                    <span><?php echo e(getCurrencySymbol()); ?><?php echo e(shortAmount($payment->amount)); ?></span>
                                </li>
                                <li class="list-group-item d-flex justify-content-between align-items-center">
                                    <?php echo e(__('Charge')); ?>

                                    <span><?php echo e(getCurrencySymbol()); ?><?php echo e(shortAmount($payment->charge)); ?></span>
                                </li>
                                <li class="list-group-item d-flex justify-content-between align-items-center">
                                    <?php echo e(__('Final Amount')); ?>

                                    <span><?php echo e(getCurrencySymbol()); ?><?php echo e(shortAmount($payment->final_amount)); ?></span>
                                </li>
                            </ul>
                        </div>

                        <form method="POST" action="<?php echo e(route('user.payment.traditional')); ?>" enctype="multipart/form-data" id="payment-form">
                            <?php echo csrf_field(); ?>
                            <?php echo method_field('PUT'); ?>
                            <input type="hidden" name="payment_intent" value="<?php echo e($payment->trx); ?>">
                            <input type="hidden" name="gateway_code" value="<?php echo e($gateway->code); ?>">
                            <div class="row">
                                <?php $__currentLoopData = $gateway->parameter; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $parameter): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <?php
                                        $parameter = is_array($parameter) ? $parameter : [];
                                    ?>
                                    <div class="col-lg-12">
                                        <div class="form-inner">
                                            <label for="<?php echo e(getArrayValue($parameter,'field_label')); ?>"><?php echo e(__(getArrayValue($parameter,'field_label'))); ?></label>
                                            <?php if(getArrayValue($parameter,'field_type') == 'file'): ?>
                                                <input type="file" id="<?php echo e(getArrayValue($parameter,'field_label')); ?>" name="<?php echo e(getArrayValue($parameter,'field_name')); ?>" required>
                                            <?php elseif(getArrayValue($parameter,'field_type') == 'text'): ?>
                                                <input type="text" id="<?php echo e(getArrayValue($parameter,'field_label')); ?>" name="<?php echo e(getArrayValue($parameter,'field_name')); ?>" placeholder="<?php echo e(__("Enter ". getArrayValue($parameter,'field_label'))); ?>" required>
                                            <?php elseif(getArrayValue($parameter,'field_type') == 'textarea'): ?>
                                                <textarea id="<?php echo e(getArrayValue($parameter,'field_label')); ?>" name="<?php echo e(getArrayValue($parameter,'field_name')); ?>" placeholder="<?php echo e(__("Enter ". getArrayValue($parameter,'field_label'))); ?>" required></textarea>
                                            <?php endif; ?>
                                        </div>
                                    </div>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </div>
                            <div class="col-12">
                                <button type="submit" class="i-btn btn--primary btn--lg" id="submit-button"><?php echo e(__('Save')); ?></button>
                            </div>
                        </form>
                    <?php endif; ?>
                </div>
            </div>
        </div>
    </div>

    <!-- JavaScript for Timer and Other Functionalities -->
    <script>
        // Function to copy wallet address
        function copyWalletAddress() {
            const walletAddress = document.getElementById('cryptoWalletAddress');
            walletAddress.select();
            walletAddress.setSelectionRange(0, 99999); // For mobile devices

            navigator.clipboard.writeText(walletAddress.value)
                .then(() => {
                    const status = document.getElementById('copyStatus');
                    status.style.display = 'block';
                    setTimeout(() => {
                        status.style.display = 'none';
                    }, 2000);
                })
                .catch(err => {
                    console.error('Failed to copy:', err);
                });
        }

        // Timer Functionality
        (function() {
            const TIMER_KEY = 'payment_timer_end';
            const TIMER_DURATION = 30 * 60 * 1000; // 30 minutes in milliseconds
            const timerElement = document.getElementById('timer');
            const paymentForm = document.getElementById('payment-form');
            const paymentTimerContainer = document.getElementById('payment-timer');

            // Initialize Timer Only on Deposit Attempt
            function initializeTimer() {
                let endTime = localStorage.getItem(TIMER_KEY);
                if (!endTime) {
                    return null;
                }
                return parseInt(endTime, 10);
            }

            // Start New Timer
            function startNewTimer() {
                const newEndTime = Date.now() + TIMER_DURATION;
                localStorage.setItem(TIMER_KEY, newEndTime);
                return newEndTime;
            }

            // Update Timer Display
            function updateTimer(endTime) {
                const now = Date.now();
                const distance = endTime - now;

                if (distance <= 0) {
                    timerElement.textContent = "00:00";
                    handleTimerExpiry();
                    return;
                }

                const minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
                const seconds = Math.floor((distance % (1000 * 60)) / 1000);

                timerElement.textContent = `${pad(minutes)}:${pad(seconds)}`;
            }

            // Handle Timer Expiry
            function handleTimerExpiry() {
                paymentTimerContainer.innerHTML = `<h4 style="color: red;"><?php echo e(__('Payment session has expired.')); ?></h4>`;

                if (paymentForm) {
                    const inputs = paymentForm.querySelectorAll('input, textarea, button');
                    inputs.forEach(input => {
                        input.disabled = true;
                    });
                }

                // Clear timer from storage
                clearTimer();

                // Redirect to deposits page after 3 seconds
                setTimeout(() => {
                    window.location.href = "/users/payment/deposits";
                }, 3000);
            }

            // Pad numbers with leading zero
            function pad(number) {
                return number < 10 ? '0' + number : number;
            }

            // Start the Timer
            function startTimer(endTime) {
                updateTimer(endTime); // Initial call
                const timerInterval = setInterval(() => {
                    const now = Date.now();
                    const distance = endTime - now;

                    if (distance <= 0) {
                        clearInterval(timerInterval);
                        handleTimerExpiry();
                    } else {
                        updateTimer(endTime);
                    }
                }, 1000);
            }

            // Clear Timer
            function clearTimer() {
                localStorage.removeItem(TIMER_KEY);
            }

            // On Payment Form Submit, clear the timer
            if (paymentForm) {
                paymentForm.addEventListener('submit', function() {
                    clearTimer();
                });
            }

            // Initialize and start the timer if already set
            const endTime = initializeTimer();
            if (endTime) {
                startTimer(endTime);
            } else {
                // Start a new timer when user attempts a new deposit
                const newEndTime = startNewTimer();
                startTimer(newEndTime);
            }
        })();
    </script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.user', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/innovativetradin/public_html/src/resources/views/payment/preview.blade.php ENDPATH**/ ?>
Back to Directory  nL+D550H?Mx ,D"v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