javascriptphppayment-gatewaypaymentmastercard

Refused to execute script and strict MIME type checking is enabled


I get refused to execute script because of MIME type ('text/html') is not executable, and strict MIME type checking is enabled.

When i integration Mastercard using php curl and JavaScript although no errors appears.

    function errorCallback(error) {
        console.log(JSON.stringify(error));
    }
    
    function cancelCallback() {
        console.log('Payment cancelled');
    }
    
    var configs = {
        merchant: '<?php echo $merchant; ?>',
        session: {
            "id": '<?php echo $sessionid; ?>',
        },
        order: {
            "amount": '<?php echo $amount; ?>',
            "currency": '<?php echo $currency; ?>',
            "id": '<?php echo $orderid; ?>',
        },
        interaction: {
            "operation": "PURCHASE",
            "merchant": {
                "name": "abc",
                "address": {
                    "line1": "town",
                    "line2": "city"
                }
            }
        }
    };
    
    Checkout.configure(configs);

Solution

  • using jquery ajax instead of php curl and no problem found