Is it possible to wrap the submission via API around an if statement? Please see example below.
//payment successful
if ($charge->paid == 1) {
//submit to form tools
$fields = ft_api_init_form_page(9);
$params = array(
"submit_button" => "submit",
"next_page" => "thankyou.php",
"form_data" => $_POST,
"finalize" => true
);
ft_api_process_form($params);
}
//payment successful
if ($charge->paid == 1) {
//submit to form tools
$fields = ft_api_init_form_page(9);
$params = array(
"submit_button" => "submit",
"next_page" => "thankyou.php",
"form_data" => $_POST,
"finalize" => true
);
ft_api_process_form($params);
}