This new code in Services\HostedService.php introduced on September 7th 2023 is causing me some problems at the minute. Essentially, if I don't supply a merchantResponseUrl in my HostedPaymentData object when initiating a charge, the code below corrupts the already successfully decoded response, precipitating the error message "SHA hash is missing. Please check your code and the Developers Documentation."
if (!isset($response['MERCHANT_RESPONSE_URL'])) {
$response = $this->mapTransactionStatusResponse($response);
}
Given that the MERCHANT_RESPONSE_URL field is optional, the above logic seems flawed to me. Without knowing fully the reason for the new code and just reading between the lines, it seems like the if-condition is not specifically related to the MERCHANT_RESPONSE_URL field but rather perhaps is just intended to check if the decoded field list is in upper snake case or in camel case, and so should instead be comparing one of the mandatory fields instead.
This new code in Services\HostedService.php introduced on September 7th 2023 is causing me some problems at the minute. Essentially, if I don't supply a merchantResponseUrl in my HostedPaymentData object when initiating a charge, the code below corrupts the already successfully decoded response, precipitating the error message "SHA hash is missing. Please check your code and the Developers Documentation."
Given that the MERCHANT_RESPONSE_URL field is optional, the above logic seems flawed to me. Without knowing fully the reason for the new code and just reading between the lines, it seems like the if-condition is not specifically related to the MERCHANT_RESPONSE_URL field but rather perhaps is just intended to check if the decoded field list is in upper snake case or in camel case, and so should instead be comparing one of the mandatory fields instead.