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
975 B
36 lines
975 B
<?php
|
|
include "./header.php";
|
|
include "T8_Authorization_curl.php";
|
|
|
|
$account_id = "M0122";
|
|
$password = "90493119";
|
|
$GroupId = 'TEST';
|
|
$validation = get_Auth();
|
|
|
|
// print_r(get_purchase_apply($validation,$GroupId,"S230300001-14"));
|
|
|
|
//費用申請單API 不能用
|
|
function get_purchase_apply($validation,$GroupId,$BillNo){
|
|
$apiurl = "http://60.244.87.101:880//twWebAPI/V1/PURFEEAPPLY/GetERPData?pkValue=$BillNo";
|
|
// echo $apiurl . "\n";
|
|
$headerParam = [
|
|
'CHI_Authorization: ' . $validation,
|
|
'GroupId:'.$GroupId
|
|
];
|
|
$ch = curl_init();
|
|
curl_setopt($ch, CURLOPT_URL, $apiurl);
|
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
|
curl_setopt($ch, CURLOPT_HTTPHEADER, $headerParam);
|
|
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
|
|
|
|
$response = curl_exec($ch);
|
|
if ($response === false) {
|
|
echo 'Curl error: ' . curl_error($ch);
|
|
} else {
|
|
$result = json_decode($response, true);
|
|
print_r($result);
|
|
}
|
|
|
|
curl_close($ch);
|
|
}
|
|
|
|
|