Submit php form and redirect from backend
You can send an ajax request to gather the key and then put it in the form and submit.This way the user will be redirected to the payu page.
The post must come from the browser not from the server. cURL is strictly server side and it cannot influence the browser behavior.