Form submission to external endpoint
-
Hi guys,
I’m a newstarter with WP, so kinda stuck here.
Task:
I’m building a payment form on my site, which should POST data to one payment system endpoint. (let it be paypal). I want to catch submit event, cuz I need to do some validation on back-end side and also change couple of POST values. What would be the right way to do that? Inspired by this reading (https://www.sitepoint.com/handling-post-requests-the-wordpress-way/) I tried to use admin_post, so I pointed my form to admin_post.php and assigned custom function upon hook.
Question: How can I redirect now to payment system endpoint keeping my post data? Is there any other way to catch form submission event?Appreciate your help on this.
- The topic ‘Form submission to external endpoint’ is closed to new replies.