PayPal Donation for Contact Form 7
Accept PayPal donations directly through any Contact Form 7 form on your WordPress site. The plugin integrates PayPal's payment system with CF7, allowing you to collect payments with configurable amounts, quantities, and currencies.
Overviewโ
- Author: Themesic
- Integration: Contact Form 7 + PayPal REST API
- Supported Currencies: 25 currencies (default: AUD)
Requirementsโ
- A self-hosted WordPress installation
- Contact Form 7 plugin installed and activated
- A PayPal Business account (for live payments)
- A PayPal Developer account (for sandbox testing)
Installationโ
- Extract the downloaded archive and locate the
upload.zipfile. - In your WordPress admin panel, navigate to Plugins โ Add New.
- Click Upload Plugin, select the
upload.zipfile, and press Install Now. - Click Activate to enable the plugin.
Configurationโ
After activation, configure PayPal settings on a per-form basis:
- Navigate to Contact โ Contact Forms in your WordPress admin panel.
- Edit the form you want to add PayPal donations to.
- Click the PayPal tab to access the payment configuration.
Each configuration option includes a balloon tooltip with on-screen instructions. Hover over the info icons for contextual help.
General Settingsโ
| Setting | Description |
|---|---|
| Use PayPal Payment Form | Enable to activate the PayPal submit button on this form |
| Enable Test API Mode | Enable to use PayPal Sandbox for testing transactions |
| Enable Debug Mode | Enable to start logging transaction details for debugging |
API Credentialsโ
Configure the appropriate credentials based on your mode:
Sandbox (Test Mode):
| Field | Required | Description |
|---|---|---|
| Sandbox PayPal Client Id | Yes | Your Sandbox application Client ID |
| Sandbox PayPal Client Secret | Yes | Your Sandbox application Secret Key |
Live Mode:
| Field | Required | Description |
|---|---|---|
| Live PayPal Client Id | Yes | Your Live application Client ID |
| Live PayPal Client Secret | Yes | Your Live application Secret Key |
Never share your PayPal Client Secret publicly. Keep your live credentials secure and use Sandbox credentials during development and testing.
Additional Settingsโ
| Setting | Description |
|---|---|
| Select Currency | Choose from 25 supported currencies (default: AUD) |
| Success Return URL | (Optional) URL to redirect users after a successful payment |
| Cancel Return URL | (Optional) URL to redirect users if the transaction is cancelled |
PayPal API Credentialsโ
Obtaining Sandbox (Test) Credentialsโ
- Visit the PayPal Developer Dashboard.
- Log in with your PayPal account.
- Navigate to Sandbox โ Accounts.
- Select your sandbox business account and click Profile.
- Go to the API credentials tab.
- Copy the Client ID and Secret into the plugin's Sandbox fields.
Obtaining Live Credentialsโ
- Visit the PayPal Developer Dashboard.
- Log in with your PayPal account.
- Navigate to My Apps & Credentials.
- Toggle to Live mode using the switch at the top.
- Select your application (or create a new one).
- Copy the Client ID and Secret into the plugin's Live fields.
Always test your integration thoroughly using Sandbox mode before switching to Live. This ensures your forms, amounts, and redirects work correctly without processing real payments.
Field Configurationโ
Map your Contact Form 7 form fields to PayPal transaction data using the field name settings.
Amount Field Name (Required)โ
Specify the name attribute of the CF7 field that holds the donation amount.
Example: If your form contains:
[hidden price "20"]
Set the Amount Field Name to price.
Quantity Field Name (Optional)โ
Specify the name attribute of the CF7 field that holds the quantity.
Example: If your form contains:
[radio quantity "1" "2" "3"]
Set the Quantity Field Name to quantity.
Description Field Name (Optional)โ
Specify the name attribute of a CF7 text field to use as the item description in the PayPal transaction.
Use a combination of hidden fields and visible fields to create flexible donation forms. For instance, use a hidden field for a fixed amount or a number field to let users enter a custom amount.
Video Tutorialโ
Supportโ
If you encounter any issues or need assistance, visit the Themesic support portal: