All our plugins are WooCommerce 3.0 compatible!

If you find any bugs or enhancements in this script get in touch with a clear description of the problem so we can fix it. We do not support modifications!

Requirements

The following things are required to run this script:

  • PHP 5.4.0+
  • MySQL 5+
  • Apache
  • WordPress 3.8+

Index

  1. Installation
  2. Setup
  3. Features
  4. Troubleshooting

 

INSTALLATION

Make sure you have installe Contact Fom 7 & Redux Framework Plugin before installation!

1. Upload the ZIP via the wordpress backend

  • Log into your website backend /wp-admin/
  • Go to Plugins -> Install -> Upload Plugin
  • Select the ZIP file and upload it
  • Active it and that’s it!

2. Upload it via FTP

  • Log into your webserver via FTP
  • Unzip the file on your PC
  • Upload the extracted folder to /wp-content/plugins/
  • Go into your backend and activate the Plugin

Return to the Index


SETUP

Plugin Settings

In the first step you should configure the Plugin settings. Therefore navigate to your admin panel and go to Contact -> PayPal. Or copy this URL: http://www.yourdomain.com/wp-admin/admin.php?page=Wordpress_Contact Form 7_Paypal_options_options. Make sure the required Plugins are installed!

We are going to use PayPal’s sandbox first in order to test the functionality. Therefore you need a Developer Account and your PayPal Identity. To get an developer Account simply login with your normal PayPal login here: https://developer.paypal.com. Then go to the Accounts Page and create a Business and a Buyer Account.

Next is to get your PayPal Identity. So go ahead and login with the just created Sandbox Business Account here: https://www.sandbox.paypal.com or visit directly this link: https://www.sandbox.paypal.com/cgi-bin/customerprofileweb?cmd=%5fprofile%2dwebsite%2dpayments. Make sure you check all required options inside this Panel:

  1. Activate Automatic Return (do not forget to put a URL there!)
  2. Activate the Payment data transfer. Then you will see your Identity below.
  3. Save it!

After Paypal is set up, go back to the plugin settings and:

  1. Enable the Plugin
  2. Enable the Sandbox Mode
  3. Enter your Sandbox Account (the Business, not the Buyer)
  4. Enter your PayPal Identity

Now we have to configure the payment options inside the 2nd Settings tab (see screenshot below). Here you have to …

  1. Set your Country
  2. Set your Currency
  3. Set your Locale
  4. Set your Fixed Tax
  5. Set your Tax Rate
  6. Set your Return URL
    Make sure you have enabled the redirect inside your PayPal Business Account
  7. Set your Cancel URL
    Make sure you have enabled the redirect inside your PayPal Business Account


Create the Contact Form

After we have set up the Plugin Settings we can create our first Contact Form. Let us first say, that PayPal offers a huge amount of input fields, that can be added to your Contact Form. A full reference can be found here. But we will cover only the most important ones.

Customer Details

If you do not want to use the Customer Informations from the Buyers PayPal account you can override them with custom fields. For example the first name, lastname or the address. See the following example:

<h2>Your Contact</h2>
<p style="width: 50%; float:left;">Your First Name*<br />
    [text* first_name] </p>
<p style="width: 50%; float:left;">Your Last Name*<br />
    [text* last_name] </p>
<p style="width: 50%; float:left;">Your Name*<br />
    [text* last_name] </p>
<p style="width: 50%; float:left;">Your Email*<br />
    [text* email] </p>
<p style="width: 50%; float:left;">Your Address1*<br />
    [text* address1] </p>
<p style="width: 50%; float:left;">Your Address2*<br />
    [text address2] </p>
<p style="width: 50%; float:left;">Your City*<br />
    [text* city] </p>
<p style="width: 50%; float:left;">Your State*<br />
    [text* state] </p>
<p style="width: 50%; float:left;">Your Zip*<br />
    [text* zip] </p>
<p style="width: 50%; float:left;">Your Country (2 Digits)*<br />
    [text* country] </p>

The Products you want to sell

Next we will configure the product(s), that we want to sell. Because we use the PayPal Cart functionality we can setup unlimited items. One Item always consists of the following fields. XX always stands for the current ID of your product (e.g. 1 or 2).

  1. Item Name (item_name_XX) | Example: <input type=”hidden” name=”item_name_1″ value=”Product 1″>
  2. Item Number / SKU (item_number_XX) | Example: <input type=”hidden” name=”item_number_1″ value=”product-1-999″>
  3. Item Amount / Price (amount_XX) | Example: <input type=”hidden” name=”amount_1″ value=”10″>
  4. Item Quanitity (quantity_XX) | Example: [number quantity_1 min:1 class:fw max:10 “1”]
<h2>Your Order</h2>

<h4>Product 1 (SKU: 999)</h4>
<p><b>Price: 10 € / Unit</b></p>
<input type="hidden" name="item_name_1" value="Product 1">
<input type="hidden" name="item_number_1" value="product-1-999">
<input type="hidden" name="amount_1" value="10">Quantity:<br/> 
[number quantity_1 min:1 class:fw max:10 "1"]

The PayPal Button

After youhave set up the “Data” we have to create the Buttons. Our Plugin is the only one that supports both Buttons: Either the normal “send just the formular”-Button (submit) or the “Pay with PayPal”-Button (paypal). In our example we will add both buttons. The normal submit button should be clear, so we skip this. The PayPal Button can be found in the tags bar (see Screenshot below).

When you click on the Button you will get the Tag Generator Modal:

  1. Label (Button text) | Example: “Pay with PayPal”
  2. Paypment successfull Redirect URL (this overrides the Global URL) | Example: “http://www.yourdomain.com/custom-success-url/”
  3. Paypment cancelled Redirect URL (this overrides the Global URL) | Example: “http://www.yourdomain.com/custom-cancel-url/”
  4. Class attribute | Example: “paypal-button”

Then we insert the tag and get the following Contact Form buttons

[paypal class:paypal-button return:http://www.yourdomain.com/custom-success-url/ cancel_return:http://www.yourdomain.com/custom-cancel-url/ "Pay with Paypal"]
[submit "Or send individual Request"]

We have added some divs and a product image to make the order form look a bit better. So here is the full contact form:

<h2>Your Contact</h2>
<p style="width: 50%; float:left;">Your First Name*<br />
    [text* first_name] </p>
<p style="width: 50%; float:left;">Your Last Name*<br />
    [text* last_name] </p>
<p style="width: 50%; float:left;">Your Name*<br />
    [text* last_name] </p>
<p style="width: 50%; float:left;">Your Email*<br />
    [text* email] </p>
<p style="width: 50%; float:left;">Your Address1*<br />
    [text* address1] </p>
<p style="width: 50%; float:left;">Your Address2*<br />
    [text* address2] </p>
<p style="width: 50%; float:left;">Your City*<br />
    [text* city] </p>
<p style="width: 50%; float:left;">Your State*<br />
    [text* state] </p>
<p style="width: 50%; float:left;">Your Zip*<br />
    [text* zip] </p>
<p style="width: 50%; float:left;">Your Zip*<br />
    [text* country] </p>

<h2>Your Order</h2>

<div class="row">
	<div class="col-sm-6">
		<img src="http://woocommerce.db-dzine.com/wp-content/uploads/2013/06/T_7_front-600x600.jpg" alt="Product 1">
		</div>
	<div class="col-sm-6">
		<h4>Product 1 (SKU: 999)</h4><p><b>Price: 10 € / Unit</b></p><input type="hidden" name="item_name_1" value="Product 1"><input type="hidden" name="item_number_1" value="999"><input type="hidden" name="amount_1" value="10">Quantity:<br/> [number quantity_1 min:1 class:fw max:10 "1"]

		[paypal class:fw "Pay with Paypal"]<div style="margin-bottom:10px;display:block;"></div>
		[submit class:fw "Or send individual Request"]
	</div>
</div>
Note: Do not forget to insert the fields also inde the Mail tab! Otherwise you will not receive the Data by mail!

Do a test

Let us test if the Contact Form works:

  1. Create a new Page
  2. Inser the Contact Form 7 Shortcode (in our case it is: [contact-form-7 id="529" title="Paypal Test"])
  3. Visit the Page
  4. Enter your Data
  5. Click the Pay with PayPal Button
  6. You should be redirected to PayPal
  7. Make sure you are on sandbox.paypal.com
  8. Now login with your Sandbox Buyer Account
  9. Pay the Bill
  10. The you should be redirect to your success page.
  11. Furthermore the Blog Admin will receive an Email, if a successfull transaction has been made!

Check the Transactions

If nothing went wrong, what we do not hope, then you can now look into the transactions overview. There you can find all transactions, that have been made through our Plugin. Note: This data is live fetched by PayPal and requires our Identity Key!


Return to the Index


FEATURES

Settings Panel

Where can I find the Contact Form 7 PayPal settings?

You can find the everything inside your Admin Panel inside WooCommerce -> Contact Form 7 PayPal


General Settings

In the General settings are you have the following options:


Payment Options

  • Send Mail
    Check this if you want to send the normal CF7 mail even when the paypment was cancelled or successfull.
  • Country
    See: Paypal Country Code Reference
  • Currency
    See: Paypal Currency Reference
  • Locale
    See: Paypal Locales Code Reference
  • Fixed Tax
    Set a fixed Tax amount (e.g. 0.50 for 50 cents). Note: This value overrides any tax settings set in your account profile.
  • Tax Rate
    Enter your tax rate in percentage without % (e.g. 19). Note: This value overrides any tax settings set in your account profile.
  • Return URL
    Redirect URL when paypement was successfull. Note: you have to enable the redirect inside your paypal Business account settings.
  • Cancel URL
    Redirect URL when paypement was canceled. Note: you have to enable the redirect inside your paypal Business account settings.


Advanced Settings

  • Custom CSS
  • Custom JS


Return to the Index


TROUBLESHOOTING

Where can I find the Contact Form 7 PayPal settings?

You can find the everything inside your Admin Panel in Contact Form 7 PayPal -> Settings


I found a bug / got an error

Please make a comment on codecanyon. We will take care asap!

CHANGELOG

Changelog
======
1.0.5
======
- FIX: Removed the disable ajax, so that other forms do not get influenced

======
1.0.4
======
- FIX: Compatibility to Contact form 7 version 4.6
- FIX: Datatable initialization

======
1.0.3
======
- FIX: Live account issue

======
1.0.2
======
- FIX: PHP 5.4 fixes

======
1.0.1
======
- FIX: PHP 5.4 compatibility

======
1.0.0
======
- Inital release


======
Future Updates
======
- Allow Address override ()
- Choose between differenc cmd types
- See: https://developer.paypal.com/docs/classic/paypal-payments-standard/integration-guide/Appx_websitestandard_htmlvariables/
Search