@extends('layouts.admin', ['heading' => 'Pay In', 'subheading' => 'Accept payments using Razorpay'])

@section('content')
    <div class="admin-card p-5">
        <div class="text-center">
            <form action="{{ route('admin.razorpay.pay') }}" method="POST">
                @csrf
                <script
                    src="https://checkout.razorpay.com/v1/checkout.js"
                    data-key="{{ $razorpay_key }}"
                    data-amount="{{ request()->input('amount', 1000) }}"
                    data-currency="INR"
                    data-order_id="{{ $order_id }}"
                    data-buttontext="Pay with Razorpay"
                    data-name="{{ config('app.name') }}"
                    data-description="Payment for order"
                    data-image="/placeholder.png"
                    data-prefill.name="{{ auth()->user()->name }}"
                    data-prefill.email="{{ auth()->user()->email }}"
                    data-theme.color="#F37254"
                ></script>
                <input type="hidden" name="razorpay_payment_id" id="razorpay_payment_id">
                <input type="hidden" name="razorpay_signature"  id="razorpay_signature" >
            </form>
        </div>
    </div>
@endsection
