<html>

<head>
    <title> Non-Seamless-kit</title>
</head>

<body>
<!-- onload="invokePayment()" -->
    <center>
    <!-- https://test.ccavenue.com/transaction/transaction.do?command=initiateTransaction -->
	
        <form method="post" name="redirect" action="https://secure.ccavenue.com/transaction/transaction.do?command=initiateTransaction">
            @csrf
            <input id="encData" type="hidden" name="encRequest" value="{{ $merchant_data }}">
            <input id="accessKey" type="hidden" name=access_code value="{{ $access_code }}">

        </form>
        
    </center>
    
    <script language='javascript'>
        document.redirect.submit();

        // function invokePayment() {

        //     window.location = 'https://test.ccavenue.com/transaction/transaction.do?command=initiateTransaction';

        //     var encData = '{{ $merchant_data }}';
        //     var accessKey = '{{ $access_code }}';
            
        //     alert(encData);

        //     $.ajax({
        //         type: "POST",
        //         url: "https://test.ccavenue.com/transaction/transaction.do?command=initiateTransaction",
        //         data: {
        //             encRequest: encData,
        //             access_code: accessKey
        //         },
        //         success: function(data) {

        //         }
        //     });

        // }
    </script>
</body>

</html>