I would like to pass data using jQuery into a service which I have created in tibco. is it possible?
The code that I have written returns me a error alert and I am not sure what is wrong.
Update: This is the error I'm getting at the console.
Access to XMLHttpRequest at 'http://swaggerurl/payment' from origin 'http://localhost' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
        $(document).ready(function() {
            var serviceURL = 'http://swaggerURL/payment';
            jQuery.ajax({
                url: serviceURL,
                type: "post",
                data: {
                        PID: 1,
                        OID: 1,
                        Pstatus: "Complete",
                        price: 20
                    },
                success: function(){
                    alert('success');
                },
                error: function(){
                    alert('failure');
                }
            });
        });
 
    