We will be off from 27/1 (Monday) to 31/1 (Friday) (GMT +7) for our Tet Holiday (Lunar New Year) in our country

Commit 86764cbc authored by Aleffio's avatar Aleffio

PW-560: added logging for errored responses

parent 56992b70
......@@ -75,12 +75,14 @@ class PosCloudResponseValidator extends AbstractValidator
// Do the status call(try to place an order)
return $this->createResult($isValid, $errorMessages);
} else {
$this->adyenLogger->error(json_encode($response));
throw new \Magento\Framework\Exception\LocalizedException(__($response['error']));
}
}
// We receive a SaleToPOIRequest when the terminal is not reachable
if (!empty($response['SaleToPOIRequest'])){
$this->adyenLogger->error(json_encode($response));
throw new \Magento\Framework\Exception\LocalizedException(__("The terminal could not be reached."));
}
......@@ -100,6 +102,7 @@ class PosCloudResponseValidator extends AbstractValidator
if (!empty($paymentResponse) && $paymentResponse['Response']['Result'] != 'Success') {
$errorMsg = __($paymentResponse['Response']['ErrorCondition']);
$this->adyenLogger->error($errorMsg);
$this->adyenLogger->error(json_encode($response));
throw new \Magento\Framework\Exception\LocalizedException(__("The transaction could not be completed."));
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment