Plugin Directory

Changeset 2698068


Ignore:
Timestamp:
03/23/2022 02:54:21 AM (4 years ago)
Author:
anthonyeden
Message:

Version 2.2.0

Location:
profiler-donations-gravityforms/trunk
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • profiler-donations-gravityforms/trunk/README.md

    r1881378 r2698068  
    1 ![Profiler + Gravity Forms](http://mediarealm.com.au/wp-content/uploads/2016/07/Gravity-Forms-Profiler-Banner.png)
     1![Profiler + Gravity Forms](https://mediarealm.com.au/wp-content/uploads/2021/12/Profiler-GravityForms-Banner-1200x450.png)
    22
    33# [Profiler Donations / Gravity Forms - Wordpress Plugin](http://mediarealm.com.au/wordpress-plugins/profiler-gravity-forms-donation-plugin/)
    4 A Wordpress plugin to integrate your Gravity Forms with Profile IMS. This is an unofficial plugin, not created by the developers of Profiler IMS. [Visit the plugin's website](http://mediarealm.com.au/wordpress-plugins/profiler-gravity-forms-donation-plugin/)
     4A Wordpress plugin to integrate your Gravity Forms with Profiler CRM. [Visit the plugin's website](http://mediarealm.com.au/wordpress-plugins/profiler-gravity-forms-donation-plugin/), and the [official WordPress.org entry](https://wordpress.org/plugins/profiler-donations-gravityforms/).
    55
    66This plugin is free software, distributd under the GPLv2 license. See the full terms of the license in the file `LICENSE.md` and the disclaimer at the bottom of this `README.md` file.
     
    1212### Prerequisites
    1313
    14 *   [Wordpress](https://wordpress.org) site with Administrative access
     14*   [WordPress](https://wordpress.org) site with Administrative access
    1515*   [Gravity Forms](http://www.gravityforms.com)
    1616*   Payment Gateway integration with Gravity Forms (must be pre-existing and use standard Gravity Forms payment hooks and database fields)
    17   * For Australian non-profits, we recommend the [Gravity Forms eWay plugin](https://wordpress.org/plugins/gravityforms-eway/)
    18 * Profiler v7.3 or higher
     17  * For Australian non-profits, we recommend the official Gravity Forms Stripe plugin
    1918*   Full administrative access to Profiler
    20 *   cURL Enabled on Web Server
     19*   CURL and XML Enabled on Web Server
    2120
    2221### 1. Installing the Gravity Forms plugin
    2322
    24 1.  Download the [latest release](https://github.com/anthonyeden/Profiler-Donations-GravityForms) of this plugin
    25231.  Login to your Wordpress site
    26242.  Navigate to the Plugins page
    27253.  Click “Add New” (in the header)
    28 4.  Click “Upload Plugin” (in the header)
    29 5.  Choose the “profiler-donations-gf.zip” file and press “Upload Now”
     265.  Search for 'Profiler Integration for Gravity Forms' and click 'Install'
    30276.  Click “Activate Plugin”
    3128
    3229### 2. Configure your Donation Form
    3330
    34 Setup your donation form with the following fields:
     31This webpage has the official setup instructions: https://support.profiler.net.au/kb/linking-a-payment-donation-gravity-form-to-profiler-using-the-plugin/
    3532
    36 | Field Name         | Type                                         | Notes                                                                                                                    |
    37 | ------------------ | -------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
    38 | Donation Type      | Standard > Radio Buttons                     | Two values: "once" and "regular"                                                                                         |
    39 | Donation Amount    | Pricing > Option (Radio Buttons)             | Required.                                                                                                                |
    40 | Other Amount       | Pricing > Product                            | Required. Conditional Logic to only display if "Other" selected in "Donation Amount" field.                              |
    41 | Regular Frequency  | Standard > Hidden *Or* Standard > Radio      | Two possible values: 'monthly' or 'yearly'. Conditional Logic to only display if "regular" is selected in Donation Type. |
    42 | Credit Card        | Pricing > Credit Card                        | Required.                                                                                                                |
    43 | First Name         | Standard > Single Line Text                  | Required.                                                                                                                |
    44 | Last Name          | Standard > Single Line Text                  | Required.                                                                                                                |
    45 | Organisation       | Standard > Single Line Text                  | Optional.                                                                                                                |
    46 | Email Address      | Advanced > Email                             | Required.                                                                                                                |
    47 | Address            | Advanced > Address                           | Required. Address Type: Australia. Default Country: Australia. Disable "Street Address 2".                               |
    48 | Phone Number       | Advanced > Phone                             | Phone Format: International.                                                                                             |
    49 | Comments           | Standard > Paragraph Text                    | Optional.                                                                                                                |
    50 | Profiler Logs      | Standard > Hidden                            |                                                                                                                          |
    51 
    52 
    53 ### 3. Profiler Setup
    54 
    55 1.  Login to Profiler
    56 2.  Go to *Setup > System Wide Settings > System Wide Settings*
    57 3.  If "API User" and "API Password" are blank, press “Create API Access”
    58 4.  Make note of the following fields on this screen:
    59  1. API User
    60  2. API Password
    61  3. DB Name
    62 5.  Go to *Setup > Donation & Pledge Attributes/Settings > Source Codes*
    63  a. Create or find a Source Code to use for once-off donations and a Source Code to use for recurring pledges (make note of these)
    64 6.  Go to *Setup > Donation & Pledge Attributes/Settings > Pledge Acquire Codes*
    65  1. Create or find an Acquisition Code for regular pledges (make a note of this code).
    66 7.  Go to *Setup > System Parameters > Special Event Settings*
    67 8.  Under the heading "Website RAPID", set the following field values and save your changes:
    68  1. Enable XML Rapid = Yes
    69  2. External Matching = Yes
    70  3. Auto-Approve Cmmnts = No
    71  4. Watchdog Time-Out = 5 (minutes)
    72  5. Approval Score = 5
    73  6. Auto Don/Pledge Create = Donations
    74  7. Pledge Method = Website
    75 9.  Go to *Setup > Integration/3rd Party Parameters > General Settings*, set the following fields and save your changes:
    76  1. Source Code = (your source for general web donations)
    77  2. Donation Pay Method = Credit Card
    78  3. Comment Type = (Web Comment reason – create one if it doesn’t already exist)
    79  4. Show New Int. Waiting = Yes
    80  5. No Gateway Needed = Yes
    81 10. Go to *Setup > Integration/3rd Party Parameters > User Defined Field Maps*, set the following fields (these fields are saved automatically)
    82  1. User Defined 1 = Donation Source Code
    83  2. User Defined 2 = Gateway Response
    84  3. User Defined 3 = Client IP Address
    85  4. User Defined 4 = Pledge Source Code
    86  5. User Defined 5 = Pledge Acquisition Code
    87 
    88 ### 4. Configure the Gravity Forms Profiler Feed
    89 
    90 1.  Go to *Form Settings > Profiler Donations*
    91 2.  Click "Add New"
    92 3.  Fill out the fields as follows:
    93 
    94 | Setting Name                             | How to set this field                                                                                                                                                              |
    95 | ---------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
    96 | Profiler Server Address                  | An address in this format, with your Profiler database name substituted in: "https://DATABASE.profiler.net.au/ProfilerPROG/api/api_call.cfm"                                       |
    97 | Profiler Database Name                   | The database name found in Step 3.d.c.                                                                                                                                             |
    98 | Profiler API Key                         | The API Key found in Step 3.d.a.                                                                                                                                                   |
    99 | Profiler API Password                    | The API Password found in Step 3.d.b.                                                                                                                                              |
    100 | Profiler Errors Email Address            | An email address you want error messages to be emailed to. Emails sent to this address will need to be manually entered into Profiler as the integration failed.                   |
    101 | Amount Field                             | In 99% of setups, this will need to be set to “Total”.                                                                                                                             |
    102 | Donation Type                            | The Donation Type field you setup in Step 2.                                                                                                                                       |
    103 | Pledge Frequency                         | The Pledge Frequency field you setup in Step 2. This field’s value needs to be “monthly” or “yearly”. If you don’t want to give users the option, set a hidden field to “monthly”. |
    104 | Pledge Amount                            | In 99% of setups, this will need to be set to “Total”.                                                                                                                             |
    105 | Client fields                            | Map all these fields to the corresponding form fields. If you don’t need a field, select nothing.                                                                                  |
    106 | Comments                                 | Map this to the user’s comment field (or leave this empty if you don’t want to accept comments).                                                                                   |
    107 | UDF: Donation Source Code                | User Defined 1. |                                                                                                                                                                  |
    108 | Source Code – Default Value              | The default donation source code you found in Step 3.e.                                                                                                                            |
    109 | UDF: Pledge Source Code                  | User Defined 4.                                                                                                                                                                    |
    110 | Pledge Source Code – Default Value       | The default recurring pledge source code you found in Step 3.e.                                                                                                                    |
    111 | UDF: Pledge Acquisition Code             | User Defined 5.                                                                                                                                                                    |
    112 | Pledge Acquisition Code – Default Value  | The pledge acquisition source code you found in Step 3.f.                                                                                                                          |
    113 | UDF: Client IP Address                   | User Defined 3.                                                                                                                                                                    |
    114 | UDF: Gateway Transaction ID              | User Defined 2. This is the transaction ID generated by the payment gateway.                                                                                                       |
    115 | Profiler Logs                            | Set this to a hidden field in which you want to store the Profiler request and response data (this must be a hidden field). You may need to check this data to debug any errors.   |
    116 
    117 4.  Save the settings
    118 
    119 ### 5. Test the form
     33### 3. Test the form
    12034
    12135Testing the form is very important. Make sure you test all combinations, pre-defined amounts and other options. Ensure all data is correctly passed through to Profiler. **It's your responsibility to test all functionality to ensure it performs to your requriements.**
  • profiler-donations-gravityforms/trunk/class-profilercommon.php

    r2618947 r2698068  
    66    protected $_url = "";
    77    protected $_title = "Profiler / Gravity Forms - Integration Feed";
     8
     9    protected $_capabilities_form_settings = 'gravityforms_edit_settings';
    810
    911    protected $apifield_apikey = "apikey";
     
    225227        );
    226228
     229        $fields[] = array(
     230            'type'           => 'feed_condition',
     231            'name'           => 'feed_condition',
     232            'label'          => 'Feed Condition',
     233            'checkbox_label' => 'Enable Conditional Logic for this Feed',
     234            'instructions'   => 'This Feed will only be processed if the condition(s) specified here are met.'
     235        );
     236
    227237        return array(
    228238            array(
     
    366376
    367377            if(method_exists($this, 'process_feed_success')) {
    368                 $this->process_feed_success($feed, $entry, $form, $pfResponse);
     378                $this->process_feed_success($feed, $entry, $form, $pfResponse, $postData);
    369379            }   
    370380        } else {
     
    666676            if ($feed['is_active'] && $this->is_feed_condition_met($feed, $form, $entry)) {
    667677                return $feed;
    668                 break;
    669             }
    670         }
     678            }
     679        }
     680
     681        return false;
    671682    }
    672683
  • profiler-donations-gravityforms/trunk/class-profilerdonate-gfaddon.php

    r2618947 r2698068  
    760760    }
    761761
    762     public function process_feed_success($feed, $entry, $form, $pfResponse) {
     762    public function process_feed_success($feed, $entry, $form, $pfResponse, $postData) {
    763763
    764764        if(!isset($pfResponse['dataArray']['status']) || $pfResponse['dataArray']['status'] != "Pass") {
     
    769769            // Store the Integration ID as meta so we can use it later
    770770            if(isset($pfResponse['dataArray']['id'])) {
    771                 gform_add_meta($entry["id"], "profiler_integrationid", $pfResponse['dataArray']['id'], $form_id);
    772                 gform_add_meta($entry["id"], "profiler_sourcecode", $postData['userdefined' . $feed['meta']['profilerdonation_userdefined_sourcecode']], $form_id);
     771                gform_add_meta($entry["id"], "profiler_integrationid", $pfResponse['dataArray']['id'], $form['id']);
     772                gform_add_meta($entry["id"], "profiler_sourcecode", $postData['userdefined' . $feed['meta']['profilerdonation_userdefined_sourcecode']], $form['id']);
    773773            }
    774774        }
     
    788788        $feed = $this->get_feed_instance($form, $entry);
    789789
    790         if(!$feed) {
     790        if($feed === false || !is_array($feed)) {
    791791            return $gform_validation_result;
    792792        }
  • profiler-donations-gravityforms/trunk/class-profilerevents-gfaddon.php

    r2319643 r2698068  
    228228    }
    229229
    230     public function process_feed_success($feed, $entry, $form, $pfResponse) {
     230    public function process_feed_success($feed, $entry, $form, $pfResponse, $postData) {
    231231
    232232        if(!isset($pfResponse['dataArray']['status']) || $pfResponse['dataArray']['status'] != "Pass") {
  • profiler-donations-gravityforms/trunk/class-profilerinteraction-gfaddon.php

    r2618947 r2698068  
    311311    }
    312312
    313     public function process_feed_success($feed, $entry, $form, $pfResponse) {
     313    public function process_feed_success($feed, $entry, $form, $pfResponse, $postData) {
    314314
    315315        if(!isset($pfResponse['dataArray']['status']) || $pfResponse['dataArray']['status'] != "Pass") {
     
    320320            // Store the Integration ID as meta so we can use it later
    321321            if(isset($pfResponse['dataArray']['id']))
    322                 gform_add_meta($entry["id"], "profiler_integrationid", $pfResponse['dataArray']['id'], $form_id);
     322                gform_add_meta($entry["id"], "profiler_integrationid", $pfResponse['dataArray']['id'], $form['id']);
    323323        }
    324324
  • profiler-donations-gravityforms/trunk/class-profilerlists-gfaddon.php

    r2618947 r2698068  
    264264    }
    265265
    266     public function process_feed_success($feed, $entry, $form, $pfResponse) {
     266    public function process_feed_success($feed, $entry, $form, $pfResponse, $postData) {
    267267
    268268        if(!isset($pfResponse['dataArray']['status']) || $pfResponse['dataArray']['status'] != "Pass") {
     
    273273            // Store the Integration ID as meta so we can use it later
    274274            if(isset($pfResponse['dataArray']['id']))
    275                 gform_add_meta($entry["id"], "profiler_integrationid", $pfResponse['dataArray']['id'], $form_id);
     275                gform_add_meta($entry["id"], "profiler_integrationid", $pfResponse['dataArray']['id'], $form['id']);
    276276        }
    277277
  • profiler-donations-gravityforms/trunk/class-profilerlistsbasic-gfaddon.php

    r2319643 r2698068  
    7575            "choices" => $field_settings,
    7676            "pf_apifield" => "email",
     77        );
     78
     79        $fields[] = array(
     80            "label" => 'Client: Phone',
     81            "type" => "select",
     82            "name" => "profilerlist_clientphone",
     83            "required" => false,
     84            "choices" => $field_settings,
     85            "pf_apifield" => "phonenumber",
    7786        );
    7887
     
    157166    }
    158167
    159     public function process_feed_success($feed, $entry, $form, $pfResponse) {
     168    public function process_feed_success($feed, $entry, $form, $pfResponse, $postData) {
    160169
    161170        if(!isset($pfResponse['dataArray']['status']) || $pfResponse['dataArray']['status'] != "Pass") {
  • profiler-donations-gravityforms/trunk/class-profilerpostdonate-gfaddon.php

    r2618947 r2698068  
    150150    }
    151151
    152     public function process_feed_success($feed, $entry, $form, $pfResponse) {
     152    public function process_feed_success($feed, $entry, $form, $pfResponse, $postData) {
    153153
    154154        if(!isset($pfResponse['dataArray']['status']) || $pfResponse['dataArray']['status'] != "Pass") {
     
    159159            // Store the Integration ID as meta so we can use it later
    160160            if(isset($pfResponse['dataArray']['id']))
    161                 gform_add_meta($entry["id"], "profiler_integrationid", $pfResponse['dataArray']['id'], $form_id);
     161                gform_add_meta($entry["id"], "profiler_integrationid", $pfResponse['dataArray']['id'], $form['id']);
    162162        }
    163163
  • profiler-donations-gravityforms/trunk/index.php

    r2618947 r2698068  
    22/*
    33Plugin Name: Profiler Donations - Gravity Forms Add-On
    4 Plugin URI: http://mediarealm.com.au/
     4Plugin URI: https://mediarealm.com.au/
    55Description: Integrates Gravity Forms with Profiler, enabling donation data and more to be sent directly to Profiler.
    6 Version: 2.1.0
     6Version: 2.2.0
    77
    88Author: Media Realm
    9 Author URI: http://www.mediarealm.com.au/
     9Author URI: https://www.mediarealm.com.au/
    1010
    1111License: GPL2
  • profiler-donations-gravityforms/trunk/readme.txt

    r2618947 r2698068  
    33Tags: gravity-forms, fundraising, crm, donation, profiler
    44Requires at least: 5.0
    5 Tested up to: 5.8.1
     5Tested up to: 5.9.2
    66Stable tag: trunk
    7 Requires PHP: 7.2.0
     7Requires PHP: 7.4.0
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    1313== Description ==
    1414
    15 A Wordpress plugin to integrate your Gravity Forms with Profiler CRM. You can send Donations and Interactions directly to Profiler from your Gravity Form. You can also use Profiler as a Payment Gateway!
     15A Wordpress plugin to integrate your Gravity Forms with Profiler CRM. You can send Donations, Interactions, Mailing List Subscriptions, and more directly to Profiler from your Gravity Form. You can also use Profiler as a Payment Gateway!
    1616
    1717
     
    1919
    20201. Install and activate the plugin
    21 2. Configure the plugin, and Profiler, based on these instructions: https://github.com/anthonyeden/Profiler-Donations-GravityForms/blob/master/README.md
     212. Configure the plugin, and Profiler, based on these instructions: https://support.profiler.net.au/kb/linking-a-payment-donation-gravity-form-to-profiler-using-the-plugin/
    2222
    2323== Changelog ==
     24
     25= 2.2.0 =
     26
     27Always make a backup before updating, and test your website thoroughly after any update.
     28
     29* NEW: Add Conditional Logic to all Feeds, for optional feed processing based on user-defined criteria
     30* NEW: Mailing List Basic: Add the Phone Number field
     31* NEW: Allow editing feed settings with capability 'gravityforms_edit_settings'
     32* FIX: profiler_sourcecode & profiler_integrationid meta field storage
    2433
    2534= 2.1.0 =
Note: See TracChangeset for help on using the changeset viewer.