Example #1
0
 public function __construct($registry)
 {
     $this->pfHelper = Payfort_Fort_Helper::getInstance($registry);
     $this->pfConfig = Payfort_Fort_Config::getInstance($registry);
     $this->pfOrder = new Payfort_Fort_Order($registry);
     $this->registry = $registry;
 }
 public function __construct($registry)
 {
     parent::__construct($registry);
     $this->pfConfig = Payfort_Fort_Config::getInstance();
     $this->pfPayment = Payfort_Fort_Payment::getInstance();
     $this->integrationType = PAYFORT_FORT_INTEGRATION_TYPE_REDIRECTION;
     $this->paymentMethod = PAYFORT_FORT_PAYMENT_METHOD_SADAD;
 }
 public function __construct(\Zend_Controller_Request_Abstract $request, \Zend_Controller_Response_Abstract $response, array $invokeArgs = array())
 {
     $this->pfConfig = Payfort_Fort_Config::getInstance();
     $this->pfPayment = Payfort_Fort_Payment::getInstance();
     $this->pfHelper = Payfort_Fort_Helper::getInstance();
     $this->pfOrder = new Payfort_Fort_Order();
     $this->integrationType = 'redirection';
     parent::__construct($request, $response, $invokeArgs);
 }
 public function __construct($registry)
 {
     parent::__construct($registry);
     $this->pfConfig = Payfort_Fort_Config::getInstance($registry);
     $this->pfPayment = Payfort_Fort_Payment::getInstance($registry);
     $this->pfHelper = Payfort_Fort_Helper::getInstance($registry);
     $this->pfOrder = new Payfort_Fort_Order($registry);
     $this->integrationType = $this->pfConfig->getCcIntegrationType();
     $this->paymentMethod = PAYFORT_FORT_PAYMENT_METHOD_CC;
 }
Example #5
0
 public function __construct()
 {
     parent::__construct();
     $this->pfConfig = Payfort_Fort_Config::getInstance();
     $this->pfHelper = Payfort_Fort_Helper::getInstance();
     $this->pfPayment = Payfort_Fort_Payment::getInstance();
     if (session_id() == '') {
         session_start();
     }
 }
Example #6
0
 public function __construct()
 {
     $this->pfConfig = Payfort_Fort_Config::getInstance();
     //        //$this->_code    = PAYFORT_FORT_PAYMENT_METHOD_CC;
     if ($this->pfConfig->getCcIntegrationType() == PAYFORT_FORT_INTEGRATION_TYPE_MERCAHNT_PAGE2) {
         $this->_formBlockType = 'payfort/form_cc_notsaved';
         $this->_infoBlockType = 'payfort/info_cc_notsaved';
     } else {
         $this->_formBlockType = 'payfort/form_gateway';
     }
     parent::__construct();
 }
 public function __construct()
 {
     global $woocommerce;
     $this->has_fields = false;
     $this->load_plugin_textdomain();
     $this->icon = apply_filters('woocommerce_FORT_icon', PAYFORT_FORT_URL . 'assets/images/cards.png');
     if (is_admin()) {
         $this->has_fields = true;
         $this->init_form_fields();
     }
     // Define user set variables
     $this->title = Payfort_Fort_Language::__('Credit / Debit Card');
     $this->description = $this->get_option('description');
     $this->pfConfig = Payfort_Fort_Config::getInstance();
     $this->pfHelper = Payfort_Fort_Helper::getInstance();
     $this->pfPayment = Payfort_Fort_Payment::getInstance();
     $this->enable_sadad = $this->get_option('enable_sadad') == 'yes' ? true : false;
     $baseCurrency = $this->pfHelper->getBaseCurrency();
     $frontCurrency = $this->pfHelper->getFrontCurrency();
     if ($this->pfHelper->getFortCurrency($baseCurrency, $frontCurrency) != 'SAR') {
         $this->enable_sadad = false;
     }
     $this->enable_naps = $this->get_option('enable_naps') == 'yes' ? true : false;
     if ($this->pfHelper->getFortCurrency($baseCurrency, $frontCurrency) != 'QAR') {
         $this->enable_naps = false;
     }
     $this->enable_credit_card = $this->get_option('enable_credit_card') == 'yes' ? true : false;
     // Actions
     add_action('woocommerce_receipt_' . $this->id, array($this, 'receipt_page'));
     add_action('wp_enqueue_scripts', array($this, 'payment_scripts'));
     // Save options
     add_action('woocommerce_update_options_payment_gateways_' . $this->id, array($this, 'process_admin_options'));
     if (!$this->is_valid_for_use()) {
         $this->enabled = false;
     }
     //add_action('woocommerce_api_'.strtolower(get_class($this).'_process_response'), array(&$this, 'process_response'));
     //add_action('woocommerce_api_'.strtolower(get_class($this).'_merchantPageResponse'), array(&$this, 'merchantPageResponse'));
     //add_action('woocommerce_api_'.strtolower(get_class($this).'_merchantPageCancel'), array(&$this, 'merchantPageCancel'));
     add_action('woocommerce_wc_gateway_payfort_fort_process_response', array(&$this, 'process_response'));
     add_action('woocommerce_wc_gateway_payfort_fort_responseOnline', array(&$this, 'responseOnline'));
     add_action('woocommerce_wc_gateway_payfort_fort_merchantPageResponse', array(&$this, 'merchantPageResponse'));
     add_action('woocommerce_wc_gateway_payfort_fort_merchantPageCancel', array(&$this, 'merchantPageCancel'));
 }
Example #8
0
 public function __construct()
 {
     parent::__construct();
     $this->pfConfig = Payfort_Fort_Config::getInstance();
 }
Example #9
0
 public function __construct($registry)
 {
     $this->pfConfig = Payfort_Fort_Config::getInstance($registry);
     $this->registry = $registry;
 }
 public function __construct($registry)
 {
     parent::__construct($registry);
     $this->pfConfig = Payfort_Fort_Config::getInstance($registry);
     $this->pfHelper = Payfort_Fort_Helper::getInstance($registry);
 }
Example #11
0
 public function __construct()
 {
     $this->pfConfig = Payfort_Fort_Config::getInstance();
     $this->registry = Payfort_Fort_Util::getRegistry();
 }
Example #12
0
 function __construct()
 {
     $this->pfConfig = Payfort_Fort_Config::getInstance();
     $this->pfHelper = Payfort_Fort_Helper::getInstance();
 }
Example #13
-1
 public function __construct()
 {
     parent::__construct();
     $this->pfHelper = Payfort_Fort_Helper::getInstance();
     $this->pfConfig = Payfort_Fort_Config::getInstance();
     $this->pfOrder = new Payfort_Fort_Order();
 }