You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
989 B
36 lines
989 B
|
|
<?php
|
|
include "T8_Authorization.php";
|
|
?>
|
|
<script>
|
|
get_Auth();
|
|
window.addEventListener('message', function(event) {
|
|
if (event.origin === "http://127.0.0.1" && (typeof event.data === "string")) {
|
|
var validation = event.data;
|
|
console.log("event");
|
|
console.log(validation);
|
|
|
|
var corsurl = 'http://cors-anywhere.herokuapp.com/';
|
|
var apiurl = 'http://60.244.87.101:880//twWebAPI/V1/SALSALESORDER/GetERPData?pkValue=T23080088';
|
|
headerParam = {
|
|
CHI_Authorization: `${validation}`,
|
|
};
|
|
// var json = JSON.stringify(body);
|
|
obj = {
|
|
type: 'GET',
|
|
url: `${corsurl}${apiurl}`,
|
|
// url: `${apiurl}`,
|
|
// dataType: 'json',
|
|
headers: headerParam,
|
|
// data: json,
|
|
// dataType: "json",
|
|
success: function(res) {
|
|
console.log(res.Status);
|
|
console.log(res.ErrorMsg);
|
|
console.log(res.Data);
|
|
}
|
|
};
|
|
jQuery.ajax(obj);
|
|
}
|
|
})
|
|
</script>
|