Ejemplo n.º 1
0
 /**
  * Plugins loaded
  */
 public function plugins_loaded()
 {
     // Add-on
     // The `class_exists` call is required to prevent strage errors on some hosting environments
     if (Pronamic_WP_Pay_Class::method_exists('GFForms', 'include_payment_addon_framework')) {
         GFForms::include_payment_addon_framework();
         if (class_exists('GFPaymentAddOn')) {
             $this->addon = new Pronamic_WP_Pay_Extensions_GravityForms_PaymentAddOn();
         }
     }
 }
Ejemplo n.º 2
0
<?php

add_action('wp', array('GFPayPal', 'maybe_thankyou_page'), 5);
GFForms::include_payment_addon_framework();
class GFPayPal extends GFPaymentAddOn
{
    protected $_version = GF_PAYPAL_VERSION;
    protected $_min_gravityforms_version = '1.9.3';
    protected $_slug = 'gravityformspaypal';
    protected $_path = 'gravityformspaypal/paypal.php';
    protected $_full_path = __FILE__;
    protected $_url = 'http://www.gravityforms.com';
    protected $_title = 'Gravity Forms PayPal Standard Add-On';
    protected $_short_title = 'PayPal';
    protected $_supports_callbacks = true;
    private $production_url = 'https://www.paypal.com/cgi-bin/webscr/';
    private $sandbox_url = 'https://www.sandbox.paypal.com/cgi-bin/webscr/';
    // Members plugin integration
    protected $_capabilities = array('gravityforms_paypal', 'gravityforms_paypal_uninstall');
    // Permissions
    protected $_capabilities_settings_page = 'gravityforms_paypal';
    protected $_capabilities_form_settings = 'gravityforms_paypal';
    protected $_capabilities_uninstall = 'gravityforms_paypal_uninstall';
    // Automatic upgrade enabled
    protected $_enable_rg_autoupgrade = true;
    private static $_instance = null;
    public static function get_instance()
    {
        if (self::$_instance == null) {
            self::$_instance = new GFPayPal();
        }