Pay before posting (frontend insert post)

I have a form on the frontend which I want users to fill out, when they have I want to save the data and redirect them to pay before submitting the post. How do I save the data before they pay?

I have a cookie working that lets me know when they have successfully paid. If they haven't paid then the form action looks like this:

$form_action = get_bloginfo('template_url').'/Checkout/paypal_ec_redirect.php';

Can I pass these post variables to the above page somehow?

$new_post = array(
    'post_title'    = $_POST['title'],
    'post_content'  = $_POST['description'],
    'post_status'   = 'draft',           
    'post_type' = 'listing'                 
);

Topic wp-insert-post paypal forms Wordpress

Category Web


You can use sessions to store the data. There is a plugin also for that which I have used in the past and it works quite good.

https://wordpress.org/plugins/wp-session-manager/

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.