update payload API
This commit is contained in:
parent
bd6006a31d
commit
fa3b81a1f9
|
|
@ -54,9 +54,14 @@ final class Index
|
|||
$payload['details'][] = (new Detail($item))->jsonSerialize();
|
||||
}
|
||||
try {
|
||||
$payloadReq = [
|
||||
'urlAPI' => '/api/quote/data-save-prology',
|
||||
'data' => $payload
|
||||
];
|
||||
$response = $this->_client()->post($this->_config['url'], [
|
||||
'json' => $payload
|
||||
'json' => $payloadReq
|
||||
]);
|
||||
|
||||
$statusCode = $response->getStatusCode();
|
||||
$responseContent = $response->getBody()->getContents();
|
||||
return json_encode([
|
||||
|
|
@ -64,7 +69,7 @@ final class Index
|
|||
'statusCode' => $statusCode,
|
||||
'response' => $responseContent
|
||||
],
|
||||
'payload' => $payload,
|
||||
'payloadReq' => $payloadReq,
|
||||
'config' => $this->_config
|
||||
]);
|
||||
} catch (BadResponseException $ex) {
|
||||
|
|
@ -75,7 +80,7 @@ final class Index
|
|||
'statusCode' => $statusCode,
|
||||
'response' => $responseContent
|
||||
],
|
||||
'payload' => $payload,
|
||||
'payloadReq' => $payloadReq,
|
||||
'config' => $this->_config
|
||||
]);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue