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.

Can this be done with GF/PayPal?

  1. hatmandu
    Member

    Hi. I'm hoping you can clarify whether the following process is possible with GF (I realise it may be a bit complicated)...
    1. User X registers; when they do so, one form field is for their PayPal email address.
    2. The form that User X fills in is used to create a post. Included in the form is a file upload, and a price.
    3. Once admin has approved that post, Visitor Y can come along to the site, view the post created by User X (without being registered) and pay with PayPal to download the file.
    4. The payment for the file goes to User X's PayPal account.
    5. The post now becomes closed to further visitors.

    (My ideal scenario is that the site owner can take a cut of the payment to User X, but I've posted on a separate thread about that; and for now the seller-to-buyer relationship is enough to get my head round.)

    Digging in this forum I've seen various elements of this seem to be supported by GF (eg a different PayPal address in each purchase form), but I'm wondering about the whole flow. Clearly data from stages 1/2 has to be reused in a new form auto-generated in the post for stage 3.

    I don't need shopping cart stuff - just the idea of one person submitting content and another coming along and paying for it. Or am I insane? Thanks!

    Posted 12 years ago on Friday May 18, 2012 | Permalink
  2. hatmandu
    Member

    Anyone? Can one form be created by the input from another? Thanks

    Posted 12 years ago on Tuesday May 22, 2012 | Permalink
  3. Let me ask around the team to see if anyone has any ideas for you.

    Posted 12 years ago on Tuesday May 22, 2012 | Permalink
  4. hatmandu
    Member

    Thanks Rob - much appreciated!

    Posted 12 years ago on Tuesday May 22, 2012 | Permalink
  5. Hi Hatmandu,

    The biggest obstacle will be dynamically updating the PayPal feed to user User X's paypal email when User Y submits the order form. We've added a hook in a development version of the PayPal add-on which will allow you to modify the config.

    Before I get too much deeper into an explaining the overview, are you comfortable working with PHP? This would be a somewhat advanced customization.

    Posted 12 years ago on Tuesday May 22, 2012 | Permalink
  6. hatmandu
    Member

    Thanks David - interesting. I'm reasonably au fait with PHP, yes.

    Posted 12 years ago on Wednesday May 23, 2012 | Permalink
  7. Here are some thoughts and notes:

    1. User X registers; when they do so, one form field is for their PayPal email address.
    2. The form that User X fills in is used to create a post. Included in the form is a file upload, and a price.

    These pieces are easy peasy and possible out of the box with Gravity Forms. Just creating a post and setting a custom field on that post to a field value from the form for the users paypal email.

    3. ... Visitor Y can come along to the site, view the post created by User X (without being registered) and pay with PayPal to download the file.
    4. The payment for the file goes to User X's PayPal account.

    The hook I mentioned in my previous post is called "gform_paypal_get_feeds". When the plugin makes a call to get all of a forms feeds. You will have to handle getting the "active" lead (first feed that matches the paypal condition). Once you have filtered out the extraneous feeds, you can modify the feed to be returned and add the email of the User X for the PayPal transaction.

    Send me an email at david@rocketgenius.com and I"ll send you a dev copy of the PayPal add-on so you can get started. Bare in mind... I have not done this but I do not see any reason it would not work.

    5. The post now becomes closed to further visitors.

    You could hook into the gform_after_submission hook to put User X's post "on hold" if another user has submitted an order for it. The reason you'll want to do this is that their might be some delay between the order submission and the successful payment status. Not much, but enough that multiple users could potentially purchase the same product.

    You'll also want to add some validation via the gform_validation hook. Since a user might have completed an order for User X's post while another user is still filling out the form, you'll want to validate on submission to make sure the post was not purchased during the time the user was filling out the form.

    Lastly, you'll want to add some functionality on the page template (on the theme side) to not show the form if the product has been sold.

    Good luck! :D

    Posted 12 years ago on Wednesday May 23, 2012 | Permalink
  8. hatmandu
    Member

    Thanks David - I'll drop you an email!

    Posted 12 years ago on Thursday May 24, 2012 | Permalink