JFIF$        dd7 

Viewing File: /home/alphaedg/public_html/src/resources/views/payment/process.blade.php

@extends('layouts.user')
@section('content')
    <div class="main-content" data-simplebar>
        <div class="row">
            <div class="col-lg-12">
                <div class="i-card-sm mb-4">
                    <div class="card-header">
                        <h4 class="title">{{ __($setTitle) }}</h4>
                    </div>
                    <div class="card-body">
                        <div class="row g-3">


    <style>

        h3 { font-size: 18px; color: #4C6EF5; margin-bottom: 20px; }
        p { font-size: 14px; margin-bottom: 10px; color: #555; }
        label, input, select, button {
            display: block;
            width: 100%;
            font-size: 14px;
            margin-bottom: 20px;
        }
        input, select {
            padding: 12px;
            border: 2px solid #4c6ef5;
            border-radius: 6px;
            box-sizing: border-box;
            width: calc(100% - 4px);
        }
        input:focus, select:focus {
            border-color: #4C6EF5;
            outline: none;
			font-size: 13px; color: #4C6EF5
        }
		button {
			padding: 16px;
			border: none;
			border-radius: 6px;
			background-color: #4C6EF5;
			color: white;
			cursor: pointer;
		}
		button:hover { background-color: #375bd8; }
        .go-back-btn { background-color: #ff6f61; }
        .go-back-btn:hover { background-color: #e55b51; }
        footer { margin-top: 30px; font-size: 14px; color: #aeaeae; }
        footer a { color: #6F42C1; text-decoration: none; font-weight: bold; }
        footer a:hover { text-decoration: underline; }
        #usdt-network { display: none; }
    </style>
<body>
    <div class="container">

         <form id="cryptoForm">
            <label for="amount"><b>Enter Amount (Min. $100):</b></label>
            <input type="number" name="amount" id="amount" min="10" required>
            <label for="currency">Select Gateway:</label>
            <select name="currency" id="currency" onchange="toggleNetworkOptions()">
                <option value="BTC">Bitcoin (BTC)</option>
                <option value="ETH">Ethereum (ETH)</option>
				<option value="BNB">Binance Coin (BNB)</option>
				<option value="TRX">Tron (TRX)</option>
                <option value="USDT">Tether (USDT)</option>
                <option value="SOL">Solana (SOL)</option>
                <option value="DOGE">Dogecoin (DOGE)</option>
            </select>
            <div id="usdt-network">
                <label for="network">Select Network:</label>
                <select name="network" id="network">
                    <option value="ERC20">ERC20</option>
                    <option value="TRC20">TRC20</option>
                    <option value="BEP20">BEP20</option>
                </select>
            </div>
            <button type="button" onclick="generateAddress()">Get Payment Address & QR Code</button>
        </form>

       <div id="result" style="display:none;">
			   <center>
			    <article>
                   <img src="../images/qrcode.jpg" id='qrcodes' width="35px"  height="35px" style='border-radius: 2px'>
                    </article>
					Awaiting Payment
  					<span style="font-size: 20px; color: #f92706" id="timer">60:00</span><br>
					</center>
					<center>
					<br>
            <img id="qrCode" src="" alt="QR Code">
			<br>
            <input type="text" id="address" readonly style="width: 100%; box-sizing: border-box; padding: 12px; border-radius: 6px; border: 2px solid #ddd; margin-bottom: 20px;">
            <button onclick="copyAddress()">Copy Address</button>
            <p id="transactionInfo"></p>
            <button class="go-back-btn" onclick="goBack()">Change Payment</button>
			</center>
        </div>
    </div>


<script>
function toggleNetworkOptions() {
    document.getElementById('usdt-network').style.display = document.getElementById('currency').value === 'USDT' ? 'block' : 'none';
}

function generateAddress() {
    var amount = parseFloat(document.getElementById('amount').value);
    if (isNaN(amount) || amount < 100) {
        alert('Minimum payment is $100.');
        return;
    }
    var currency = document.getElementById('currency').value;
    var network = document.getElementById('network') ? document.getElementById('network').value : '';
	var qrcodes = document.getElementById('qrcodes');
    var payload = {
        currency: currency,
        amount: amount,
        merchant: 'D6GUOX-MARCLT-AAP8AS-NGLAJE',
        orderId: 'ORD-' + Date.now(),
        callbackUrl: 'https://example.com/callback',
        email: 'customer@example.com'
    };
	  if (currency === "BTC") {
			 console.log(qrcodes.src = 'https://s2.coinmarketcap.com/static/img/coins/64x64/1.png')
	} else if (currency === "ETH") {
			 console.log(qrcodes.src = 'https://s2.coinmarketcap.com/static/img/coins/64x64/1027.png')
	} else if (currency === "USDT") {
			 console.log(qrcodes.src = 'https://s2.coinmarketcap.com/static/img/coins/64x64/825.png')
	} else if (currency === "SOL") {
			 console.log(qrcodes.src = 'https://s2.coinmarketcap.com/static/img/coins/64x64/5426.png')
	} else if (currency === "BNB") {
			 console.log(qrcodes.src = 'https://s2.coinmarketcap.com/static/img/coins/64x64/1839.png')
    } else if (currency === "TRX") {
			 console.log(qrcodes.src = 'https://s2.coinmarketcap.com/static/img/coins/64x64/1958.png')
	} else if (currency === "DOGE") {
			 console.log(qrcodes.src = 'https://s2.coinmarketcap.com/static/img/coins/64x64/74.png')
            } ;
    if (currency === 'USDT') payload.network = network;

    fetch('https://api.oxapay.com/merchants/request/staticaddress', {
        method: 'POST', headers: { 'Content-Type': 'application/json' },
        body: JSON.stringify(payload)
    })
    .then(function(res) { return res.json(); })
    .then(function(data) {
        if (data.result === 100) {
            document.getElementById('address').value = data.address;
            document.getElementById('qrCode').src = "https://api.qrserver.com/v1/create-qr-code/?data=" + encodeURIComponent(data.address) + "&size=150x150";
            document.getElementById('cryptoForm').style.display = 'none';
            document.getElementById('result').style.display = 'block';
            document.getElementById('transactionInfo').innerHTML = "Send $<b>" + amount + "</b> to the address above.<br>Once transaction is confirmed on the blockchain,<br>the amount will be credited to your Deposit Wallet.";
		} else alert('Error: ' + data.message);
		})
	
    .catch(function() { alert('Error generating address'); });			
	
}


	
function copyAddress() {
    var addr = document.getElementById('address');
    addr.select();
    addr.setSelectionRange(0, 99999);
    navigator.clipboard.writeText(addr.value).then(function() { alert("Address copied"); });
}

function goBack() {
    document.getElementById('result').style.display = 'none';
    document.getElementById('cryptoForm').style.display = 'block';
}
</script>
  <script>
	  var timeLimitInMinutes = 60;
var timeLimitInSeconds = timeLimitInMinutes * 60;
var timerElement = document.getElementById('timer');

function startTimer() {
  timeLimitInSeconds--;
  var minutes = Math.floor(timeLimitInSeconds / 60);
  var seconds = timeLimitInSeconds % 60;

  if (timeLimitInSeconds < 0) {
    timerElement.textContent = '00:00';
    clearInterval(timerInterval);
    return;
  }

  if (minutes < 10) {
    minutes = '0' + minutes;
  }
  if (seconds < 10) {
    seconds = '0' + seconds;
  }

  timerElement.textContent = minutes + ':' + seconds;
}

var timerInterval = setInterval(startTimer, 1000);
  </script>






















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

                 <div class="i-card-sm">
                    <div class="card-header">
                        <h4 class="title">{{ __('Deposit Logs') }}</h4>
                    </div>

                    <div class="filter-area">
                        <form action="{{ route('user.payment.index') }}">
                            <div class="row row-cols-lg-4 row-cols-md-4 row-cols-sm-2 row-cols-1 g-3">
                                <div class="col">
                                    <input type="text" name="search" placeholder="{{ __('Trx ID') }}" value="{{ request()->get('search') }}">
                                </div>
                                <div class="col">
                                    <select class="select2-js" name="status" >
                                        @foreach (App\Enums\Payment\Deposit\Status::cases() as $status)
                                            @unless($status->value == App\Enums\Payment\Deposit\Status::INITIATED->value)
                                                <option value="{{ $status->value }}" @if($status->value == request()->status) selected @endif>{{ $status->name  }}</option>
                                            @endunless
                                        @endforeach
                                    </select>
                                </div>
                                <div class="col">
                                    <input type="text" id="date" class="form-control datepicker-here" name="date"
                                       value="{{ request()->get('date') }}" data-range="true" data-multiple-dates-separator=" - "
                                       data-language="en" data-position="bottom right" autocomplete="off"
                                       placeholder="{{ __('Date') }}">
                                </div>
                                <div class="col">
                                    <button type="submit" class="i-btn btn--lg btn--primary w-100"><i class="bi bi-search me-3"></i>{{ __('Search') }}</button>
                                </div>
                            </div>
                        </form>
                    </div>
                    <div class="card-body">
                        <div class="row align-items-center gy-4 mb-3">
                            <div class="table-container">
                                <table id="myTable" class="table">
                                    <thead>
                                        <tr>
                                            <th scope="col">{{ __('Initiated At') }}</th>
                                            <th scope="col">{{ __('Trx') }}</th>
                                            <th scope="col">{{ __('Gateway') }}</th>
                                            <th scope="col">{{ __('Amount') }}</th>
                                            <th scope="col">{{ __('Charge') }}</th>
                                            <th scope="col">{{ __('Final Amount') }}</th>
                                            <th scope="col">{{ __('Wallet') }}</th>
                                            <th scope="col">{{ __('Status') }}</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        @forelse($deposits as $key => $deposit)
                                            <tr>
                                                <td data-label="{{ __('Initiated At') }}">
                                                    {{ showDateTime($deposit->created_at) }}
                                                </td>
                                                <td data-label="{{ __('Trx') }}">
                                                    {{ $deposit->trx }}
                                                </td>
                                                <td data-label="{{ __('Gateway') }}">
                                                    {{ $deposit?->gateway?->name ?? 'N/A' }}
                                                </td>
                                                <td data-label="{{ __('Amount') }}">
                                                    {{ getCurrencySymbol() }}{{ shortAmount($deposit->amount) }}
                                                </td>
                                                <td data-label="{{ __('Charge') }}">
                                                    {{ getCurrencySymbol() }}{{ shortAmount($deposit->charge) }}
                                                </td>
                                                <td data-label="{{ __('Final Amount') }}">
                                                    {{ getCurrencySymbol() }}{{ shortAmount($deposit->final_amount) }}
                                                </td>
                                                <td data-label="{{ __('Wallet') }}">
                                                    {{ __(\App\Enums\Transaction\WalletType::getWalletName($deposit->wallet_type)) }}
                                                </td>
                                                <td data-label="{{ __('Status') }}">
                                                    <span class="i-badge {{ App\Enums\Payment\Deposit\Status::getColor($deposit->status)}}">{{ App\Enums\Payment\Deposit\Status::getName($deposit->status)}}</span>
                                                </td>
                                            </tr>
                                        @empty
                                            <tr>
                                                <td class="text-white text-center" colspan="100%">{{ __('No Data Found')}}</td>
                                            </tr>
                                        @endforelse
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                 </div>

                <div class="mt-4">
                    {{ $deposits->links() }}
                </div>
            </div>
        </div>
    </div>

    <div class="modal fade" id="exampleModal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
        <div class="modal-dialog modal-dialog-centered">
            <div class="modal-content">
                <div class="modal-header bg--dark">
                    <h5 class="modal-title" id="gatewayTitle"></h5>
                    <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
                </div>
                <form method="POST" action="{{ route('user.payment.process') }}">
                    @csrf
                    <input type="hidden" name="code" value="">
                    <div class="modal-body">
                        <h6 id="paymentLimitTitle" class="mb-1 mt-1 text-center"></h6>
                        <div class="mb-3">
                            <label for="amount" class="col-form-label">{{ __('Amount') }}</label>
                            <div class="input-group mb-3">
                                <input type="text" class="form-control" id="amount" name="amount" placeholder="{{ __('Enter Amount') }}" aria-label="Recipient's username" aria-describedby="basic-addon2">
                                <span class="input-group-text" id="basic-addon2">{{ getCurrencyName() }}</span>
                            </div>
                        </div>

                        <div class="mb-3">
                            <label for="amount" class="col-form-label">{{ __('Wallet') }}</label>
                            <select class="form-control" name="wallet" >
                                @foreach (App\Enums\Transaction\WalletType::cases() as $status)
                                    @unless($status->value == \App\Enums\Transaction\WalletType::PRACTICE->value)
                                        <option value="{{ $status->value }}">{{ \App\Enums\Transaction\WalletType::getWalletName($status->value) }}</option>
                                    @endunless
                                @endforeach
                            </select>
                        </div>
                    </div>

                    <div class="modal-footer">
                        <button type="button" class="i-btn btn--light btn--md" data-bs-dismiss="modal">{{ __('Close') }}</button>
                        <button type="submit" class="i-btn btn--primary btn--md">{{ __('Submit') }}</button>
                    </div>
                </form>
            </div>
        </div>
    </div>

    <div class="modal fade" id="paymentDetailsModal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
        <div class="modal-dialog modal-xl">
            <div class="modal-content">
                <div class="modal-header bg--dark">
                    <h5 class="modal-title">{{ __('Payment Details') }}</h5>
                    <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
                </div>
                <div class="modal-body">
                    <div class="payment-details"></div>
                </div>
            </div>
        </div>
    </div>
@endsection

@push('script-push')
    <script>
        "use strict";
        $(document).ready(function() {
            $('.deposit-process').click(function() {
                const name = $(this).data('name');
                const code = $(this).data('code');
                const minimum = $(this).data('minimum');
                const maximum = $(this).data('maximum');
                $('input[name="code"]').val(code);

                const gatewayTitle = "Deposit with " + name + " now";
                const paymentLimit = `Deposit Amount Limit ${minimum} - ${maximum}`;
                $('#paymentLimitTitle').text(paymentLimit);
                $('#gatewayTitle').text(gatewayTitle);
            });

            $('.gateway-details').click(function (){
                const details = $(this).data('details');
                $('.payment-details').empty();
                $('.payment-details').append(details);
            });
        });
    </script>
@endpush
Back to Directory  nL+D550H?Mx ,D"v]qv;6*Zqn)ZP0!1 A "#a$2Qr D8 a Ri[f\mIykIw0cuFcRı?lO7к_f˓[C$殷WF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