PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Creating new sites in a network after taking payment

  1. I am interested in integrating the User Registration addon + the GF PayPal addon (customized) with WPMUDEV's Pro Sites plugin and am looking for advice on the best approach & hooks to use. I'd be looking to create new sites in a network with a multi-step form that:

    1) captures some contact data
    2) uses Paypal pro to collect payment for a subscription via some add on (I know current version doesn't support PayPal pro)
    3) returns to next step in mutli-step form to collect data about site to be created
    4) after form submit (payment has been taken, validated form complete...), execute a function which exists in Pro Sites using data for the form

    Do you see any problems with my approach or a better way to do it? My approach provides that the site is only created if payment is successful.

    I'm unclear on:

    - how to return to the next step in a multi-step form after successful payment
    - how to get the numeric site ID of the site created by the user registration add on, which I need for the Pro Sites function

    Any pointers or suggestions are appreciated.

    Posted 12 years ago on Wednesday January 4, 2012 | Permalink
  2. Nice idea, John. I'll subscribe to see if this goes anywhere.

    Posted 12 years ago on Wednesday January 4, 2012 | Permalink
  3. allmyhoney
    Member

    I am interested also:)

    Posted 12 years ago on Monday January 9, 2012 | Permalink
  4. This sounds interesting! Any progress on it?

    Posted 12 years ago on Wednesday January 18, 2012 | Permalink
  5. Any luck with WPMUDEV forums?

    http://premium.wpmudev.org/forums/forum/plugin-support

    Posted 12 years ago on Friday February 17, 2012 | Permalink
  6. I'm not sure what your timeline is on the site you need the PayPal Pro Add-On for but our own PayPal Pro Add-On is in active development and is nearing beta status.

    I would suggest checking out the Authorize.Net Add-On. It works more like PayPal Pro than the PayPal Add-On itself does. Although PayPal Pro does also have IPN functionality which Authorize.Net does not. The Authorize.Net Add-On works with the User Registration Add-On so you may want to take a look at how they interact.

    Basically with Authorize.Net if a payment is going to happen the form won't submit unless the payment goes through. In that case the User Registration is going to be triggered. If payment doesn't validate or is declined, the User Registration isn't going to be triggered. It uses standard Gravity Forms form processing workflow. This differs from the PayPal Add-On that uses IPN to trigger User Creation when payment is received.

    Posted 12 years ago on Friday February 17, 2012 | Permalink
  7. John said:

    how to get the numeric site ID of the site created by the user registration add on, which I need for the Pro Sites function

    You can reference the action hook 'gform_site_created' which will include the site_id in the first parameter.

    Try the following:

    add_action('gform_site_created', 'user_registration_site_created');
    
    function user_registration_site_created($id, $user_id, $entry, $config, $password){
        //$id is the newly created site_id.
        execute_some_next_step($id);
    }

    I've not tested this specifically. However, this should get you in the right direction.

    Posted 12 years ago on Monday February 27, 2012 | Permalink
  8. John said:

    how to return to the next step in a multi-step form after successful payment

    I'd create two forms here. The first form collects some basic contact data as you stated. I'm assuming the next step takes the user to PayPal where they will submit payment information. I believe you can configure the GForm PayPal settings to return back to a specific page. This page should be the next form where the multistep registration would continue.

    It appears that multi page / step forms require the use of Post data to load previous steps. My guess is it will not be possible to reload the multipage / step form if returning from a third party payment page.

    One other consideration is complete the user registration and auto login before being redirected to PayPal. Then, when redirected from PayPal back to the next step, the logged in credentials will associate the account appropriately.

    I hope that makes sense.

    Best Regards,

    David Carroll

    Posted 12 years ago on Monday February 27, 2012 | Permalink