Integrating PayPal with Contact Form 7

For this to work, you will need to be using WordPress, have the plugin Contact Form 7 installed and own a PayPal account.

If you don’t, a few tutorials to get you started:

If you do, we’re going to start by creating a Buy Now button in PayPal. This will allow you to accept payments instantly. Create the button and fill in your details.

You will then be directed to a page explaining how to implement your button. Once there, scroll down until you find a box which looks like the one below. Click on the Email tab and save the URL. You’ll need that for later.


Next, go to your WordPress admin and edit your contact form. At the bottom, you will find a box called Additional Settings. Simply paste the code below into that box.

on_sent_ok: "location = '';"

Once you have pasted the code, update the URL with the one we saved earlier.

This code will now redirect the user to your PayPal Payment Page once they have filled out the submission form.

Save the form to apply the new settings and you’re all done!