Can you share the full text of the error message that X-Cart displays?
Do you mean this one?
Quote:
Warning: The form could not be identified as a form generated by X-Cart. The reason may be that a substantial period of time has elapsed since you opened the page with this form or the page was opened in more than one browser tab. If you did not open the page with this form, you might be under a CSRF attack.
|
If so, you should either
disable the protection for your action, or
build the URL from your PHP code and pass it to your JavaScript function
like this.