Hello,
If there is already an awnser on this forum i am sorry for that, can't find a good anwser yet.
I am trying to post my form values to a test url of miltisafepay.
At first i tried it with query string and the url https://testapi.multisafepay.com/ewx/post.php with no luck.
Then i did read about the gform_after_submission hook and now im trying to use that hook to redirect to the external site .. is this the right way? how can the redirect take place?
For now i uses the example code but it doenst redirect (probably cause it does the post in the background?):
add_action("gform_after_submission", "after_submission", 10, 2);
function after_submission($entry, $form) {
$post_url = 'http://thirdparty.com';
$body = array(
'first_name' => $entry['1.3'],
'last_name' => $entry['1.6'],
'message' => $entry['3']
);
$request = new WP_Http();
$response = $request->post($post_url, array('body' => $body));
}
Thank you in advance