WordPress.org

Ready to get started?Download WordPress

Forums

Contact Form 7
[resolved] Add PayPal integration? (13 posts)

  1. Bet Hannon
    Member
    Posted 3 years ago #

    I'm trying to add a simple option for customers who have received an invoice by mail to pay online with a credit card on the WP site. I do not want a plugin where the invoices have to be sent out from WP or PayPal to do this.

    Can I integrate PayPal with Contact Form 7, so that once a customer enters their name, email, invoice #, and the amount they are paying, it takes them to the PayPal page to complete the transaction?

    Some of the premium form plugins/solutions offer this integration, but there are only a couple of customers who want to pay online right now-- it just doesn't make financial sense to pay $200 to enable this!

    http://wordpress.org/extend/plugins/contact-form-7/

  2. Daddydesign
    Member
    Posted 2 years ago #

    hi, did you find a solution for this? Also which plugins did you find that does this but charges $200?

  3. Bet Hannon
    Member
    Posted 2 years ago #

    Hi!

    I did look at this one: http://www.123contactform.com/signup.html
    It requires their $15/mo plan for PayPal integration.

    The $200 plugin is Gravity Forms, which requires a developer license to add PayPal integration.
    http://www.gravityforms.com/purchase-gravity-forms/

    I found this tutorial for adding PayPal to Contact Form 7, but I'm a little newbie for this level of editing:
    http://www.gobdg.com/blog/code-library/donation-form-using-contact-form-7-paypal/

    In the end, I created a "payment" button for $0 with instructions for clients to enter the amount they are going to pay once they get to PayPal and refresh the page. Not ideal, but for now, that works for me.

    Let me know if you find anything out there, or if you make the CF7 edits work!

  4. trutka
    Member
    Posted 2 years ago #

    You can have the PayPal button showing up after submission of a form.

    • Copy the PayPal button code from PayPal, then in the Admin section click "Contact" for Contact 7 forms.
    • Select your form, then scroll to "Messages"
    • Paste your code into the part this part:
      # Sender's message was sent successfully"

    So after user submits form successfully they can click on the PayPal button to pay.

  5. Bet Hannon
    Member
    Posted 2 years ago #

    Thanks, trutka, for the follow up!

    I also figured out this additional work-around:

    In the "Additional Settings" field on CF7, put this code:
    on_sent_ok: "location.replace('http://yourdomain.com/pagename/');"

    This will redirect the user to the specified page upon successful send of the form. On that page, I just have the user "click here to go to PayPal for payment."

    It's not perfect, since it requires an extra click, but it works for our purposes.

  6. Sjourney
    Member
    Posted 2 years ago #

    @bethannon1 Awesome job!

  7. candy2012
    Member
    Posted 2 years ago #

    and a bit better, with no extra-page needed :)

    use this link which you will get from paypal, after creating your BuyNow button there:

    on_sent_ok:"location.replace('https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YourBuyNowButtonID');"

    which redirects the user directly to paypal for payment :)

    The only issue which I would also love to see solved, would be to also get some feedback in the contact form 7 database (if using that extra database for c7 plugin) from paypal, that the user really paid ...

    Anyone having some ideas?

  8. Bet Hannon
    Member
    Posted 2 years ago #

    candy2012: That's great!

    I've started using CF7 for some event registration forms for clients, so I'm very interested in getting payment confirmation in the CF7 database too! (Currently, we're having to check the registrations against the PayPal account by hand.)

  9. trutka
    Member
    Posted 2 years ago #

    Are you using the PayPal "redirect after payment" link? Such as going to thank you page.

  10. candy2012
    Member
    Posted 2 years ago #

    @trutka yes but going to a simple thank you page does not really help - the c7 form must send some parameters (like an unique ID for each transaction) to pay pal, and paypal needs to send back a feedback into that c7 database for ex. matching the same ID and update some field in the database.

    I have no clue how else could that be achieved. If anyone has ideas, a bunch of us would appreciate to hear them :)

    There are those paypal IPNs but I have no idea how to implement that. Still hope someone has some simple idea for us :)

  11. trutka
    Member
    Posted 2 years ago #

    That's why I asked. I'm a developer so if enough people wanted this solution I could probably create it. However it may not be feasible because there are other "contact form" plugins.

  12. candy2012
    Member
    Posted 2 years ago #

    Ah, sounds good than :)
    Contact form 7 is surely one of the most popular form plugins (almost 7 million downloads) so ... :)

    I could not find any simple paypal / form integration so far, the solution above is the closest workaround I could find.

    Fact is, one needs some sort of feedback for each paypal transaction, to know if the user paid or not. bethannon1's idea of using the "additional setting" works great in sending the user to paypal, but it does not help with the tracking of payments.

    So yep, maybe using the thank you page could work somehow

    Would be really cool if you'd find a solution :)

  13. PHoward188
    Member
    Posted 2 years ago #

    Yes I to would love this functionality

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic