i am using magento 1.3.1. While making payment with credit card I am getting a javascript alert called "und开发者_开发技巧efined".I am using ANZ as payment gateway.The money is getting deducted.but not getting reflected in admin panel also.Interestingly when i am using paypal for payment it is working perfectly.
Please can you tell me how i can solve this problem?
The error is caused by an AJAX response not returning valid JSON. Get something like Firebug or Chrome like Alan suggested and watch the network view to see AJAX request being made as you step through checkout. On saveOrder
(the last step, where you get the error) check it's content, instead of JSON I bet you will see a PHP error and stack trace. This is a clue to where the problem is but if you cannot understand add it to your question.
Logically the error must be happening after ANZ charges the credit card but before Magento commits the transaction to it's database, because an error occurs the transaction is rolled back.
To fix this problem you should think about contacting the author of ANZ eGate (Fontis) and ask for help in debugging.
That's a javascript alert, right? If so ...
Inject some JavaScript into you page rendering that overrides the alert function (not a Magento override, a javascript override.
var originalAlert = alert;
alert = function(a)
{
originalAlert("Woah, science!");
originalAlert(a);
}
Add a
debugger;
statement to your new alert function.
var originalAlert = alert;
alert = function(a)
{
debugger;
originalAlert(a);
}
Perform the action that triggers the alert with a browser that has a debugger attached (Firebug, Chrome)
When the debugger triggers, you'll see the alert in context. Step out of the alert and try to figure out why there's an undefined variable in the alert. That will point to your problem.
(searching the codebase for JavaScript alerts would be worth a try, but the above is the best way to ensure you find the right one.)
If you don't know how to do anything in this post, you have new questions to ask here.
If you're not willing to do the above, this isn't the community you're looking for.
精彩评论