I've been trying to make progress on this. I've made a little progress.
(1) I found the file containing the javascript code that generates the original error message that I saw:
Code:
An unknown response null::null::was received while processing an ajax call...
in includes/templates/template_default/jscript/jscript_framework.php.
I was able to see more information by adding options.url to the alert message.
I now see that the ajax call that generated the error is:
Code:
ajax.php?act=ajaxPayment&method=doesCollectCardDataOnsite
This actually makes a little sense, because both cod and paypal express generated the error, and they both do NOT collect the card data on the website, while authorizenet_aim does not generate the error, and it DOES collect the card data on the website, and its class has this variable set to TRUE. So I think the error may somehow be caused within the code that deals with doesCollectCardDataOnsite or collectsCardDataOnsite
(2)
When I looked at the page source of the checkout_payment page, I noticed that the end of the javascript function check_form, has 2 return statements in a row:
Code:
if (error == 1 && submitter != 1) {
alert(error_message);
return false;
} else {
return collectsCardDataOnsite(payment_value);
return true;
}
This is because in the file includes/classes/payment.php, in the function javascript_validation, it contains
Code:
$js = $js .' if (error == 1 && submitter != 1) {' . "\n";
$js = $js .' alert(error_message);' . "\n";
$js = $js . ' return false;' . "\n";
$js = $js .' } else {' . "\n";
if ($this->doesCollectsCardDataOnsite == true && PADSS_AJAX_CHECKOUT == '1') {
$js .= ' return collectsCardDataOnsite(payment_value);' . "\n";
}
$js = $js .' return true;' . "\n";
I'm guessing that the "if" statement should perhaps be
Code:
if ($this->doesCollectsCardDataOnsite == true && PADSS_AJAX_CHECKOUT == '1') {
$js .= ' return collectsCardDataOnsite(payment_value);' . "\n";
} else {
$js = $js .' return true;' . "\n";
}
but I'm not sure about that. (I did try making this change, but I still get the error.)
I did read somewhere that this ajax out of memory error could be caused by a form being submitted that causes a page to redirect, which expunges the ajax javascript. I'm not sure if that applies in this case.
I've been putting in alerts into the javascript, and I've been printing debug statements into a file, to see if I can discover anything interesting, but I haven't made any more revelations.
I'm hoping that perhaps something that I said above might trigger some ideas for the zencart developers, and you might have suggestions of things that I could try, to figure this out and hopefully fix it.
I just don't understand what would be different in my site, so that no one else has come across this problem for the cod or paypal express modules. I haven't made any changes directly to those modules. And I don't think I've made any changes to the checkout process, or the payment class.
Any ideas/suggestions would be greatly appreciated!! Thanks very much!