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/
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 to see the link]
The topic ‘An error occurred while processing the form. Please try again. Problem’ is closed to new replies.