난 당신이 적어도 엔드 포인트에 적절한 요청을 보낼 수 있으며 응답을 캡처 할 수 있다고 가정합니다.
당신은 구문 분석해야합니다 JSON 문자열을받을 수 있도록하는 경우 : 당신은 연관 배열로 responseArray를 얻을 것이다 (두 번째 매개 변수) 그래서 당신 때문에 그
$amountDue = $responseArray['data']['amountDue'];
같은 양을 얻을 수있는 그런
$response = '{"status":true,"message":"success","data":{"amountDue":"-504.20"}}';
$responseArray = json_decode($response, true);
json의 모든 필드를 객체의 속성으로 변환하는 StdClass로 json 데이터를 파싱 할 수도 있습니다. 이를 수행하려면 json_decode 함수의 두 번째 매개 변수를 버리십시오.
$resultObj = json_decode($response);
$amountDue = $resultObj->data['amountDue'];
모두 요청에 따라 다릅니다. json_decode try에 대해 더 읽으려면 documentation