<script>
    let surjobutton = document.getElementById("surjo_payment");
    surjobutton.addEventListener("click",function(){
        createToken();
    });

    function createToken(){

       $.ajax({
                url: '{{ route('surjo-execute-payment') }}',
                type: 'GET',
                contentType: 'application/json',
                data: {
                    amount: $('#amount').val(),
                },
                success: function(data) {
                    // console.log(data);
                    $(location).attr('href', data);
                },
                error: function(err) {

                }
            });
    }


</script>
