Hi Rry,
Hmm! First off, yes the ft_api_clear_form_sessions() function is definitely necessary to clean the slate after a successful submission. But from what you described, it doesn't sound like it's doing its job... if they clicked back to the form the previous submission ID simply shouldn't be in memory any longer to be passed along to PayPal. Strange!
Try this: on your first form page, after the ft_api_init_form_page call, add the following line. That will always output the contents of the current session - including whatever submission ID Form Tools thinks it has.
Then, put through a submission (in PayPal sandbox mode is best, of course), and try
(a) returning to the form page by clicking on a link to the page, or manually entering the URL in your browser and
(b) returning to the form page by navigating to the page via the "Back" button in your browser.
Take a look at what's outputted in each case.
Let me know how it goes!
- Ben
Hmm! First off, yes the ft_api_clear_form_sessions() function is definitely necessary to clean the slate after a successful submission. But from what you described, it doesn't sound like it's doing its job... if they clicked back to the form the previous submission ID simply shouldn't be in memory any longer to be passed along to PayPal. Strange!
Try this: on your first form page, after the ft_api_init_form_page call, add the following line. That will always output the contents of the current session - including whatever submission ID Form Tools thinks it has.
PHP Code:
print_r($fields);
Then, put through a submission (in PayPal sandbox mode is best, of course), and try
(a) returning to the form page by clicking on a link to the page, or manually entering the URL in your browser and
(b) returning to the form page by navigating to the page via the "Back" button in your browser.
Take a look at what's outputted in each case.
Let me know how it goes!
- Ben