Title: An error occurred while processing the form. Please try again. Problem
Last modified: May 31, 2022

---

# An error occurred while processing the form. Please try again. Problem

 *  Resolved [nikmich](https://wordpress.org/support/users/nikmich/)
 * (@nikmich)
 * [4 years ago](https://wordpress.org/support/topic/an-error-occurred-while-processing-the-form-please-try-again-problem/)
 * Hello everybody,
 * maybe somebody can help me with the error message: an error occurred while processing
   the form. please try again. I have a sepa donation form on the site that redirects
   to a newsletter page. After submitting the form, the error message comes up. 
   We have a php code that integrates API interface and passes data to our system.
   We also get the data into our system, but the user gets the error message and
   a redirect to the newsletter page does not work. My Custom Functions is the plugin
   that contains the PHP code.
 * I would be pleased about help.
 * The page I need help with: [https://baltic-sea-philharmonic-unterstuetzer.de/](https://baltic-sea-philharmonic-unterstuetzer.de/)
 * This is the code for the integration:
 *     ```
       add_action('forminator_custom_form_submit_field_data', 'my_job_submit');
       function my_job_submit($field_data_array) {
       	$payment->iban = $field_data_array[0]["value"];
       	$payment->holder = $field_data_array[1]["value"];
       	$payment->firstname = $field_data_array[2]["value"];
       	$payment->lastname = $field_data_array[3]["value"];
       	$payment->channelId = 11;
       	$payment->street = $field_data_array[4]["value"]["street_address"];
       	$payment->amount = floatval(str_replace("-Euro", "", $field_data_array[5]["value"][0]));
       	$payment->postcode = $field_data_array[4]["value"]["zip"];
       	$payment->city = $field_data_array[4]["value"]["city"];
   
       	$jsonDataEncoded = json_encode($payment);
   
       	try {
       		$ch = curl_init("https://vantaggi4u.com/paymentApi/PaymentApi/PayOut");
       		curl_setopt($ch, CURLOPT_POST, 1);
       		curl_setopt($ch, CURLOPT_POSTFIELDS, $jsonDataEncoded);
       		curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json', 'Authorization: Basic OGE4Mjk0MTc1MThiZjU2YzAxNTE5Zjg0MjEyYTFlYjc=')); 
       		curl_exec($ch);
       	} catch (Exception $e) {
       		error_log(var_export($e, true));
       	}
       }
       ```
   
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fan-error-occurred-while-processing-the-form-please-try-again-problem%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Thread Starter [nikmich](https://wordpress.org/support/users/nikmich/)
 * (@nikmich)
 * [4 years ago](https://wordpress.org/support/topic/an-error-occurred-while-processing-the-form-please-try-again-problem/#post-15696172)
 * I also did the setting “Load form using AJAX”.
 *  Plugin Support [Patrick – WPMU DEV Support](https://wordpress.org/support/users/wpmudevsupport12/)
 * (@wpmudevsupport12)
 * [4 years ago](https://wordpress.org/support/topic/an-error-occurred-while-processing-the-form-please-try-again-problem/#post-15700583)
 * Hi [@nikmich](https://wordpress.org/support/users/nikmich/)
 * I hope you are doing well.
 * Can you please try to update the line to:
 * `add_action('forminator_custom_form_submit_field_data', 'my_job_submit', 1, 20);`
 * The code worked after this for me, of course it failed because I don’t have the
   correct fields: [https://monosnap.com/file/7Q8ggcSK8pz3qJPWo2jR9Ks99DE2Tr](https://monosnap.com/file/7Q8ggcSK8pz3qJPWo2jR9Ks99DE2Tr)
 * If the problem persists, kindly enable the debug mode [https://wpmudev.com/blog/debugging-wordpress-how-to-use-wp_debug](https://wpmudev.com/blog/debugging-wordpress-how-to-use-wp_debug)
   to verify the line that it is printing in the log.
 * Best Regards
    Patrick Freitas
 *  Plugin Support [Amin – WPMU DEV Support](https://wordpress.org/support/users/wpmudev-support2/)
 * (@wpmudev-support2)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/an-error-occurred-while-processing-the-form-please-try-again-problem/#post-15750614)
 * Hello [@nikmich](https://wordpress.org/support/users/nikmich/) ,
 * We haven’t heard from you for a while now, so it looks like you don’t need our
   assistance anymore.
 * Feel free to re-open this ticket if needed.
 * Kind regards
    Kasia

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘An error occurred while processing the form. Please try again. Problem’
is closed to new replies.

 * ![](https://ps.w.org/forminator/assets/icon-256x256.gif?rev=3443182)
 * [Forminator Forms – Contact Form, Payment Form & Custom Form Builder](https://wordpress.org/plugins/forminator/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/forminator/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/forminator/)
 * [Active Topics](https://wordpress.org/support/plugin/forminator/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/forminator/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/forminator/reviews/)

 * 3 replies
 * 3 participants
 * Last reply from: [Amin – WPMU DEV Support](https://wordpress.org/support/users/wpmudev-support2/)
 * Last activity: [3 years, 11 months ago](https://wordpress.org/support/topic/an-error-occurred-while-processing-the-form-please-try-again-problem/#post-15750614)
 * Status: resolved