class WC_Piraeusbank_Gateway extends WC_Payment_Gateway { public function __construct() function pb_get_pages($title = false, $indent = true) function pb_get_installments($title = false, $indent = true) function generate_piraeusbank_form($order_id) function process_payment($order_id) function receipt_page($order) function check_piraeusbank_response() function piraeusbank_message() function woocommerce_add_piraeusbank_gateway($methods) function piraeusbank_plugin_action_links($links, $file) } class WC_NBG_Gateway extends WC_Payment_Gateway { public function __construct() public function admin_options() function init_form_fields() function nbg_get_pages($title = false, $indent = true) function nbg_get_installments($title = false, $indent = true) function generate_nbg_form($order_id) function process_payment($order_id) function receipt_page($order) { function check_nbg_response() function nbg_message() function woocommerce_add_nbg_gateway($methods) function nbg_plugin_action_links($links, $file) } global $wc; $this->id = 'nbg_gateway'; $this->icon = apply_filters('nbg_icon', plugins_url('assets/nbg.png', __FILE__)); $this->has_fields = false; $this->notify_url = WC()->api_request_url('WC_NBG_Gateway'); $this->method_description = __('National Bank Greece Payment Gateway allows you to accept payment through various channels such as Maestro, Mastercard and Visa cards On your Woocommerce Powered Site.', 'woocommerce-nbg-payment-gateway'); $this->redirect_page_id = $this->get_option('redirect_page_id'); $this->method_title = 'National Bank of Greece Gateway'; // Load the form fields. $this->init_form_fields(); //dhmioyrgia vashs global $wpdb; if ($wpdb->get_var("SHOW TABLES LIKE '" . $wpdb->prefix . "nbg_transactions'") === $wpdb->prefix . 'nbg_transactions') { // The database table exist } else { // Table does not exist $query = 'CREATE TABLE IF NOT EXISTS ' . $wpdb->prefix . 'nbg_transactions (id int(11) unsigned NOT NULL AUTO_INCREMENT,merchantreference varchar(30) not null, reference varchar(100) not null, orderid varchar(100) not null , timestamp datetime default null, PRIMARY KEY (id))'; $wpdb->query($query); } // Load the settings. $this->init_settings(); // Define user set variables $this->title = $this->get_option('title'); $this->description = $this->get_option('description'); $this->nbg_Username = $this->get_option('nbg_Username'); $this->nbg_Password = $this->get_option('nbg_Password'); $this->nbg_description= $this->get_option('nbg_description'); $this->mode = $this->get_option('mode'); $this->nbg_installments= $this->get_option('nbg_installments'); //Actions add_action('woocommerce_receipt_nbg_gateway', array($this, 'receipt_page')); add_action('woocommerce_update_options_payment_gateways_' . $this->id, array($this