CORS issue with mpaisa

var mPaisaUrl=“https://pay.mpaisa.vodafone.com.fj/API/?url=vodafone.com.fj/checkout&&tID="+trID+"&&amt="+amount+"&&cID=xx&&iDet=”+orderNo;
$log.debug("getPaymentMethods URL : " + mPaisaUrl);
var headers = {
‘Access-Control-Allow-Origin’ : ‘*’,
‘Access-Control-Allow-Methods’ : ‘POST, GET, OPTIONS, PUT’
};

        return {
            method: 'GET',                
            headers:headers,
            url: mPaisaUrl
           
        }

Origin http:/localhost:8080 is not allowed by Access-Control-Allow-Origin.

XMLHttpRequest cannot load due to access control checks

Failed to load resource:Origin is not allowed by Access-Control-Allow-Origin.

It was solved. Please follow this