id = "monero_gateway"; $this->method_title = __("Monero GateWay", 'monero_gateway'); $this->method_description = __("Monero Payment Gateway Plug-in for WooCommerce. You can find more information about this payment gateway in our website. WARN: You'll need a daemon online for your address.", 'monero_gateway'); $this->title = __("Monero Gateway", 'monero_gateway'); $this->version = "0.2"; // $this->icon = apply_filters('woocommerce_offline_icon', ''); $this->has_fields = false; $this->log = new WC_Logger(); $this->init_form_fields(); $this->host = $this->get_option('daemon_host'); $this->port = $this->get_option('daemon_port'); $this->address = $this->get_option('monero_address'); $this->username = $this->get_option('username'); $this->password = $this->get_option('password'); // After init_settings() is called, you can get the settings and load them into variables, e.g: // $this->title = $this->get_option('title' ); $this->init_settings(); // Turn these settings into variables we can use foreach ($this->settings as $setting_key => $value) { $this->$setting_key = $value; } add_action('admin_notices', array($this,'do_ssl_check')); add_action('admin_notices', array($this,'validate_fields')); add_action('woocommerce_thankyou_' . $this->id, array($this,'instruction')); if (is_admin()) { /* Save Settings */ add_action('woocommerce_update_options_payment_gateways_' . $this->id, array($this,'process_admin_options' )); } $this->monero_daemon = new Monero_Library($this->host . ':' . $this->port . '/json_rpc', $this->username, $this->password); } public function admin_options() { $this->log->add('Monero_gateway', '[SUCCESS] Monero Settings OK'); echo ""; echo "
Welcome to Monero Extension for WooCommerce. Getting started: Make a connection with daemon Contact Me"; echo "
Your Monero Address Seems not valid. Have you checked it?
" . sprintf(__("%s is enabled and WooCommerce is not forcing the SSL certificate on your checkout page. Please ensure that you have a valid SSL certificate and that you are forcing the checkout pages to be secured."), $this->method_title, admin_url('admin.php?page=wc-settings&tab=checkout')) . "
Everything works! Congratulations and Welcome aboard Monero.
Error with connection of daemon, see documentation!