/**
  * Initialize the gateway
  *
  * See parent constructor for full method documentation
  *
  * @since 1.0.0
  * @see SV_WC_Payment_Gateway::__construct()
  * @param string $id the gateway id
  * @param SV_WC_Payment_Gateway_Plugin $plugin the parent plugin class
  * @param array $args gateway arguments
  */
 public function __construct($id, $plugin, $args)
 {
     // parent constructor
     parent::__construct($id, $plugin, $args);
     $this->init_payment_tokens_handler();
     $this->init_integrations();
 }
 /**
  * Initialize the gateway
  *
  * See parent constructor for full method documentation
  *
  * @since 2.1.0
  * @see SV_WC_Payment_Gateway::__construct()
  * @param string $id the gateway id
  * @param SV_WC_Payment_Gateway_Plugin $plugin the parent plugin class
  * @param array $args gateway arguments
  */
 public function __construct($id, $plugin, $args)
 {
     // parent constructor
     parent::__construct($id, $plugin, $args);
     // payment notification listener hook
     if (!has_action('woocommerce_api_' . strtolower(get_class($this)), array($this, 'handle_transaction_response_request'))) {
         add_action('woocommerce_api_' . strtolower(get_class($this)), array($this, 'handle_transaction_response_request'));
     }
 }
 /**
  * Initialize the gateway
  *
  * See parent constructor for full method documentation
  *
  * @since 2.1.0
  * @see SV_WC_Payment_Gateway::__construct()
  * @param string $id the gateway id
  * @param SV_WC_Payment_Gateway_Plugin $plugin the parent plugin class
  * @param string $text_domain the plugin text domain
  * @param array $args gateway arguments
  */
 public function __construct($id, $plugin, $text_domain, $args)
 {
     // parent constructor
     parent::__construct($id, $plugin, $text_domain, $args);
     // IPN or redirect-back
     if ($this->has_ipn()) {
         $api_method_name = 'process_ipn';
     } else {
         $api_method_name = 'process_redirect_back';
     }
     // payment notification listener hook
     if (!has_action('woocommerce_api_' . strtolower(get_class($this)), array($this, $api_method_name))) {
         add_action('woocommerce_api_' . strtolower(get_class($this)), array($this, $api_method_name));
     }
 }
 /**
  * Initialize the gateway
  *
  * See parent constructor for full method documentation
  *
  * @since 1.0.0
  * @see SV_WC_Payment_Gateway::__construct()
  * @param string $id the gateway id
  * @param SV_WC_Payment_Gateway_Plugin $plugin the parent plugin class
  * @param string $text_domain the plugin text domain
  * @param array $args gateway arguments
  */
 public function __construct($id, $plugin, $text_domain, $args)
 {
     // parent constructor
     parent::__construct($id, $plugin, $text_domain, $args);
     // watch for subscriptions support
     if ($this->get_plugin()->is_subscriptions_active()) {
         $subscription_support_hook = 'wc_payment_gateway_' . $this->get_id() . '_supports_' . self::FEATURE_SUBSCRIPTIONS;
         $subscription_payment_method_change_hook = 'wc_payment_gateway_' . $this->get_id() . '_supports_' . self::FEATURE_SUBSCRIPTION_PAYMENT_METHOD_CHANGE;
         if (!has_action($subscription_support_hook)) {
             add_action($subscription_support_hook, array($this, 'add_subscriptions_support'));
         }
         if (!has_action($subscription_payment_method_change_hook)) {
             add_action($subscription_payment_method_change_hook, array($this, 'add_subscription_payment_method_change_support'));
         }
     }
     // watch for pre-orders support
     if ($this->get_plugin()->is_pre_orders_active()) {
         $pre_orders_support_hook = 'wc_payment_gateway_' . $this->get_id() . '_supports_' . str_replace('-', '_', self::FEATURE_PRE_ORDERS);
         if (!has_action($pre_orders_support_hook)) {
             add_action($pre_orders_support_hook, array($this, 'add_pre_orders_support'));
         }
     }
 }
 /**
  * Initialize the gateway
  *
  * See parent constructor for full method documentation
  *
  * @since 1.0.0
  * @see SV_WC_Payment_Gateway::__construct()
  * @param string $id the gateway id
  * @param SV_WC_Payment_Gateway_Plugin $plugin the parent plugin class
  * @param string $text_domain the plugin text domain
  * @param array $args gateway arguments
  */
 public function __construct($id, $plugin, $text_domain, $args)
 {
     // parent constructor
     parent::__construct($id, $plugin, $text_domain, $args);
     $this->init_integrations();
 }