protected function __construct() { parent::__construct(); self::$api_username = get_option(self::API_USERNAME_OPTION, ''); self::$api_password = get_option(self::API_PASSWORD_OPTION, ''); self::$api_signature = get_option(self::API_SIGNATURE_OPTION, ''); self::$api_mode = get_option(self::API_MODE_OPTION, self::MODE_TEST); self::$currency_code = get_option(self::CURRENCY_CODE_OPTION, 'USD'); if (is_admin()) { add_action('init', array(get_class(), 'register_options')); } // Remove pages add_filter('si_checkout_pages', array($this, 'remove_checkout_pages')); add_action('processed_payment', array($this, 'capture_payment_after_auth'), 10); add_action('si_manually_capture_purchase', array($this, 'manually_capture_purchase'), 10); // Add Recurring button add_action('recurring_payments_profile_info', array(__CLASS__, 'paypal_profile_link')); }
protected function __construct() { parent::__construct(); self::$api_mode = get_option(self::API_MODE_OPTION, self::MODE_TEST); self::$payment_modal = get_option(self::MODAL_JS_OPTION, true); self::$disable_stripe_js = get_option(self::DISABLE_JS_OPTION, false); self::$currency_code = get_option(self::CURRENCY_CODE_OPTION, 'usd'); self::$api_secret_key = get_option(self::API_SECRET_KEY_OPTION, ''); self::$api_pub_key = get_option(self::API_PUB_KEY_OPTION, ''); self::$api_secret_key_test = get_option(self::API_SECRET_KEY_TEST_OPTION, ''); self::$api_pub_key_test = get_option(self::API_PUB_KEY_TEST_OPTION, ''); if (is_admin()) { add_action('init', array(get_class(), 'register_options')); } // Remove pages add_filter('si_checkout_pages', array($this, 'remove_checkout_pages')); if (!self::$disable_stripe_js) { add_filter('sa_get_form_field', array(__CLASS__, 'filter_credit_form'), 10, 4); add_filter('si_valid_process_payment_page_fields', '__return_false'); add_action('si_credit_card_payment_fields', array(__CLASS__, 'modify_credit_form')); } }