<div class="row d-flex justify-content-center g-4">
    <div class="col-lg-8 col-md-8 text-center">
        <button type="submit"aria-label="Place an order" id="rzp-button1" data-spinning-button
            class="btn b-solid btn-primary-solid btn-xl !rounded-full w-full h-12"><?php echo e(translate('Pay with Razorpay')); ?>

        </button>
        <!-- This form is hidden -->
        <form action="<?php echo e(route('payment.success', 'razorpay')); ?>" method="GET" hidden>
            <?php echo csrf_field(); ?>
            <input type="text" class="form-control" id="rzp_paymentid" name="rzp_paymentid">
            <input type="text" class="form-control" id="rzp_orderid" name="rzp_orderid">
            <input type="text" class="form-control" id="rzp_signature" name="rzp_signature">
            <button type="submit" id="rzp-paymentresponse" class="btn btn-primary">Submit</button>
        </form>
    </div>
</div>

<script>
    var options = {
        "key": "<?php echo e($result['razorpayId'] ?? ''); ?>",
        "amount": "<?php echo e($result['amount'] ?? ''); ?>",
        "currency": "<?php echo e($result['currency'] ?? ''); ?>",
        "name": "<?php echo e($result['app_name'] ?? ''); ?>",
        "description": "<?php echo e($result['app_name'] ?? ''); ?>",
        "order_id": "<?php echo e($result['orderId'] ?? ''); ?>",
        'image': "<?php echo e($result['image'] ?? ''); ?>",
        "handler": function(response) {
            document.getElementById('rzp_paymentid').value = response.razorpay_payment_id;
            document.getElementById('rzp_orderid').value = response.razorpay_order_id;
            document.getElementById('rzp_signature').value = response.razorpay_signature;
            document.getElementById('rzp-paymentresponse').click();
        },
        "prefill": {
            "email": "<?php echo e($result['email']); ?> ?? '' ",
            "contact": "<?php echo e($result['contactNumber'] ?? ''); ?>"
        },
        "notes": {
            "address": "<?php echo e($result['address'] ?? ''); ?>"
        },
        "theme": {
            "color": "#F37254"
        }
    };
    var rzp1 = new Razorpay(options);
    document.getElementById('rzp-button1').onclick = function(e) {
        rzp1.open();
        e.preventDefault();
    }
</script>
<?php /**PATH D:\www\edulab\Modules\LMS\resources\views\theme\payment\razorpay\form.blade.php ENDPATH**/ ?>