From 7358d21b666a5e779461b6a374e062fc60a29f34 Mon Sep 17 00:00:00 2001 From: cryptochangements34 Date: Mon, 7 Aug 2017 12:17:51 -0500 Subject: [PATCH 1/3] Quick typo fix Adds the '!' operator in front of the if(isset($array_integrated_address)) expression so that the error message will only show up if it is NOT set --- monero/include/monero_payments.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/monero/include/monero_payments.php b/monero/include/monero_payments.php index 359d52c..6640332 100644 --- a/monero/include/monero_payments.php +++ b/monero/include/monero_payments.php @@ -244,7 +244,7 @@ class Monero_Gateway extends WC_Payment_Gateway $payment_id = $this->set_paymentid_cookie(); $uri = "monero:$address?amount=$amount?payment_id=$payment_id"; $array_integrated_address = $this->monero_daemon->make_integrated_address($payment_id); - if(isset($array_integrated_address)){ + if(!isset($array_integrated_address)){ $this->log->add('Monero_Gateway', '[ERROR] Unable to getting integrated address '); } $message = $this->verify_payment($payment_id, $amount_xmr2, $order); From 5ea712afb5dc85a76948922710af5333282a98ac Mon Sep 17 00:00:00 2001 From: cryptochangements34 Date: Mon, 7 Aug 2017 12:47:14 -0500 Subject: [PATCH 2/3] Update to add instructions for using a remote node --- README.md | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 4be3a6c..7e7ff72 100644 --- a/README.md +++ b/README.md @@ -15,21 +15,30 @@ Wordpress is the backend tool that is needed to use WooCommerce and this Monero This Monero plugin is an extension of WooCommerce, which works with WordPress ## Step 1: Activating the plugin -* Downloading: First of all, you will need to download the plugin. This can be done with the command `git clone https://github.com/monero-integrations/monerowp.git` or can be downloaded as a zip file from the GitHub web page. +* Downloading: First of all, you will need to download the plugin. You can download the latest release as a .zip file from https://github.com/monero-integrations/monerowp/releases If you wish, you can also download the latest source code from GitHub. This can be done with the command `git clone https://github.com/monero-integrations/monerowp.git` or can be downloaded as a zip file from the GitHub web page. -* Put the plugin in the correct directory: You will need to put the folder named `monero` from this repo into the wordpress plugins directory. This can be found at `path/to/wordpress/folder/wp-content/plugins` +* Unzip the file monerowp_release.zip if you downloaded the zip from the releases page [here](https://github.com/monero-integrations/monerowp/releases). + +* Put the plugin in the correct directory: You will need to put the folder named `monero` from this repo/unzipped release into the wordpress plugins directory. This can be found at `path/to/wordpress/folder/wp-content/plugins` * Activate the plugin from the WordPress admin panel: Once you login to the admin panel in WordPress, click on "Installed Plugins" under "Plugins". Then simply click "Activate" where it says "Monero - WooCommerce Gateway" -## Step 2: Setup the Monero Wallet RPC +## Step 2: Get a monero daemon to connect to + +### Option 1: Running a full node yourself + +To do this: start the monero daemon on your server and leave it running in the background. This can be accomplished by running `./monerod` inside your monero downloads folder. The first time that you start your node, the monero daemon will download and sync the entire monero blockchain. This can take several hours and is best done on a machine with at least 4GB of ram, an SSD hard drive (with at least 15GB of free space), and a high speed internet connection. + +### Option 2: Connecting to a remote node +The easiest way to find a remote node to connect to is to visit [moneroworld.com](https://moneroworld.com/#nodes) and use one of the nodes offered. It is probably easiest to use node.moneroworld.com:18089 which will automatically connect you to a random node. + +## Step 3: Setup your monero wallet-rpc * Setup a monero wallet using the monero-wallet-cli tool. If you do not know how to do this you can learn about it at [getmonero.org](https://getmonero.org/resources/user-guides/monero-wallet-cli.html) -* Start the monero daemon on your server and leave it running in the background. This can be accomplished by running `./monerod` inside your monero downloads folder. +* Start the Wallet RPC and leave it running in the background. This can be accomplished by running `./monero-wallet-rpc --rpc-bind-port 18082 --rpc-login username:password --log-level 2 --wallet-file /path/walletfile` where "username:password" is the username and password that you want to use, seperated by a colon and "/path/walletfile" is your actual wallet file. If you wish to use a remote node you can add the `--daemon-address` flag followed by the address of the node. `--daemon-address node.moneroworld.com:18089` for example. -* Start the Wallet RPC and leave it running in the background. This can be accomplished by running `monero-wallet-rpc --rpc-bind-port 18081 --rpc-login username:password --wallet-file /path/walletfile` where "username:password" is the username and password that you want to use, seperated by a colon and "/path/walletfile" is your actual wallet file. - -## Step 3: Setup Monero Gateway in WooCommerce +## Step 4: Setup Monero Gateway in WooCommerce * Navigate to the "settings" panel in the WooCommerce widget in the WordPress admin panel. @@ -50,4 +59,4 @@ This Monero plugin is an extension of WooCommerce, which works with WordPress * Click on "Save changes" ## Info on server authentication -It is reccommended that you specify a username/password with your wallet rpc. This can be done by starting your wallet rpc with `monero-wallet-rpc --rpc-bind-port 18081 --rpc-login username:password --wallet-file /path/walletfile` where "username:password" is the username and password that you want to use, seperated by a colon. Alternatively, you can use the `--restricted-rpc` flag with the wallet rpc like so `./monero-wallet-rpc --testnet --rpc-bind-port 18081 --restricted-rpc --wallet-file wallet/path`. +It is reccommended that you specify a username/password with your wallet rpc. This can be done by starting your wallet rpc with `monero-wallet-rpc --rpc-bind-port 18082 --rpc-login username:password --wallet-file /path/walletfile` where "username:password" is the username and password that you want to use, seperated by a colon. Alternatively, you can use the `--restricted-rpc` flag with the wallet rpc like so `./monero-wallet-rpc --testnet --rpc-bind-port 18082 --restricted-rpc --wallet-file wallet/path`. From bff329b13ef516677d3931146bc713c0e4aa3c59 Mon Sep 17 00:00:00 2001 From: cryptochangements34 Date: Mon, 7 Aug 2017 18:07:26 -0500 Subject: [PATCH 3/3] Fixes example changes example port to 18082 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7e7ff72..e318302 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ The easiest way to find a remote node to connect to is to visit [moneroworld.com * Enter the IP address of your server in the box labeled "Daemon Host/IP" -* Enter the port number of the Wallet RPC in the box labeled "Daemon PORT" (will be `18081` if you used the above example). +* Enter the port number of the Wallet RPC in the box labeled "Daemon PORT" (will be `18082` if you used the above example). * Enter the username and password that you want to use in their respective feilds