- Issue created by @igorbarato
When processing an XML response from a cccomplete request, the elavonPost method in src\Plugin\Commerce\PaymentGateway\Onsite does not currently verify whether the ssl_result or ssl_issuer_response variables contain error codes https://www.drupal.org/files/issues/2024-09-13/elavon-transaction-respon... → .
I'm wondering if the code should check for these variables to ensure the transaction is genuinely successful before concluding the process.
Additionally, I would like to understand why this $response['status'] was commented:
if (!empty($result)) {
// Extract the result into an XML response object.
$xml = new \SimpleXMLElement($result);
$response['msg'] = (string) $xml->ssl_result_message;
//$response['status'] = ((string) $xml->ssl_result_message === 'APPROVAL') ? TRUE : FALSE;
// Request approved, Save original xml response containing all the data.
$response['raw'] = $result;
$response['xml'] = $xml;
}
else {
\Drupal::logger('commerce_elavon')->error('cURL error empty result returned.');
$response['status'] = FALSE;
$response['msg'] = t('No answer from server');
}
Active
2.0
Code