HEX
Server: Apache/2.4.58 (Ubuntu)
System: Linux ip-172-26-0-120 6.17.0-1009-aws #9~24.04.2-Ubuntu SMP Fri Mar 6 23:50:29 UTC 2026 x86_64
User: ubuntu (1000)
PHP: 8.3.6
Disabled: NONE
Upload Files
File: /var/www/html/owlcrm/resources/views/subscriptions/checkout.blade.php
<!DOCTYPE html>
<html>
<head>
    <title>Razorpay Subscription Checkout</title>
    <script src="https://checkout.razorpay.com/v1/checkout.js"></script>
</head>
<body>
    <button id="pay-button">Subscribe</button>

    <script>


// 1 ajax with plan id 
// chek on  fuction if user login 
// 1 ajax responce  suscription id 


        const options = {
            key: "{{ $key }}",
            subscription_id: "{{ $subscription_id }}",
            name: "Your Company Name",
            description: "Subscription for premium features",
            prefill: {
                name: "{{ $user['name'] }}",

                email: "{{ $user['email'] }}",
                contact: "{{ $user['contact'] }}"
            },
            handler: function (response) {
                alert('Subscription successful! Payment ID: ' + response.razorpay_payment_id);
            },
            modal: {
                ondismiss: function () {
                    alert('Payment canceled.');
                }
            }
        };

        const rzp = new Razorpay(options);

        document.getElementById('pay-button').onclick = function (e) {
            rzp.open();
            e.preventDefault();
        };
    </script>
</body>
</html>