PluginProbe
Gravity Forms Eway / 1.0.1
Gravity Forms Eway v1.0.1
2.7.0 1.5.6 1.5.7 1.5.8 1.5.9 1.6.0 1.6.1 1.6.2 1.6.3 1.7.0 1.8.0 2.0.0 2.1.0 2.1.1 2.1.2 2.1.3 2.1.4 2.1.5 2.2.0 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.2.6 All 56 releases
gravityforms-eway / gravityforms-eway.php

gravityforms-eway.php in Gravity Forms Eway 1.0.1, at gravityforms-eway.php

72 lines 2.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /*
3 Plugin Name: GravityForms eWAY
4 Plugin URI: http://snippets.webaware.com.au/wordpress-plugins/gravityforms-eway/
5 Description: Integrates Gravity Forms with eWAY payment gateway, enabling end users to purchase goods and services through Gravity Forms.
6 Version: 1.0.1
7 Author: WebAware
8 Author URI: http://www.webaware.com.au/
9 */
10
11 /*
12 copyright (c) 2012 WebAware Pty Ltd (email : rmckay@webaware.com.au)
13
14 This program is free software; you can redistribute it and/or modify
15 it under the terms of the GNU General Public License, version 2, as
16 published by the Free Software Foundation.
17
18 This program is distributed in the hope that it will be useful,
19 but WITHOUT ANY WARRANTY; without even the implied warranty of
20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 GNU General Public License for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with this program; if not, write to the Free Software
25 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
26 */
27
28 /*
29 useful references:
30 http://www.gravityhelp.com/forums/topic/credit-card-validating#post-44438
31 http://www.gravityhelp.com/documentation/page/Gform_creditcard_types
32 http://www.gravityhelp.com/documentation/page/Gform_enable_credit_card_field
33 http://www.gravityhelp.com/documentation/page/Form_Object
34 http://www.gravityhelp.com/documentation/page/Entry_Object
35 */
36
37 if (!defined('GFEWAY_PLUGIN_ROOT')) {
38 define('GFEWAY_PLUGIN_ROOT', dirname(__FILE__) . '/');
39 define('GFEWAY_PLUGIN_NAME', basename(dirname(__FILE__)) . '/' . basename(__FILE__));
40 define('GFEWAY_PLUGIN_OPTIONS', 'gfeway_plugin');
41 }
42
43 /**
44 * autoload classes as/when needed
45 *
46 * @param string $class_name name of class to attempt to load
47 */
48 function gfeway_autoload($class_name) {
49 static $classMap = array (
50 'GFEwayAdmin' => 'class.GFEwayAdmin.php',
51 'GFEwayFormData' => 'class.GFEwayFormData.php',
52 'GFEwayOptionsAdmin' => 'class.GFEwayOptionsAdmin.php',
53 'GFEwayPayment' => 'class.GFEwayPayment.php',
54 'GFEwayPlugin' => 'class.GFEwayPlugin.php',
55 'GFEwayResponse' => 'class.GFEwayResponse.php',
56 );
57
58 if (isset($classMap[$class_name])) {
59 require GFEWAY_PLUGIN_ROOT . $classMap[$class_name];
60 }
61 }
62
63 // register a class (static) method for autoloading required classes
64 spl_autoload_register('gfeway_autoload');
65
66 // instantiate the plug-in
67 $GFEwayPlugin = GFEwayPlugin::getInstance();
68
69 // register plug-in activation / deactivation
70 register_activation_hook(__FILE__, array($GFEwayPlugin, 'activate'));
71 register_deactivation_hook(__FILE__, array($GFEwayPlugin, 'deactivate'));
72