From 4148b9fef7ffecc9cf0db91fe7470bdab5f1da9e Mon Sep 17 00:00:00 2001 From: Dimitris Apostolou Date: Sun, 20 May 2018 23:26:59 +0300 Subject: [PATCH] Fix typos --- README.md | 18 +++++++++--------- modules/monero/controllers/front/payment.php | 2 +- .../monero/controllers/front/validation.php | 2 +- modules/monero/library.php | 8 ++++---- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index f572256..5e7364d 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ # MoneroPS -A Prestashop addon for accepting Monero (XMR) +A Prestashop addon for accepting Monero (XMR) Compatible with the stable version of Prestashop (1.6.x). And working on 1.7.x -## Dependancies -This plugin is rather simple but there are a few things that need to be set up before hand. +## Dependencies +This plugin is rather simple but there are a few things that need to be set up beforehand. * A web server! Ideally with the most recent versions of PHP and mysql @@ -20,11 +20,11 @@ Prestashop is open source e-commerce engine to run your own shop and this Monero * Upload the module and activate it. You can refer the official documentation [here](https://addons.prestashop.com/en/content/21-how-to) -## Step 2 : Use your wallet address and connect to an monero daemon +## Step 2 : Use your wallet address and connect to a Monero daemon ### 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 40GB of free space), and a high speed internet connection. +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 40GB of free space), and a high speed internet connection. You can refer the official documentation for running full node from [here](https://github.com/monero-project/monero). ### Option 2: Connecting to a remote node @@ -32,13 +32,13 @@ The easiest way to find a remote node to connect to is to visit [moneroworld.com `Note: You must run your JSON RPC on the host server of Prestashop against your wallet` -### Setup your monero wallet-rpc +### 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 [https://github.com/monero-project/monero](https://github.com/monero-project/monero) -You can checkout the monero wallet commands from [here](https://github.com/monero-project/monero/wiki/monero-wallet-cli-commands) +* 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 [https://github.com/monero-project/monero](https://github.com/monero-project/monero) +You can check out the monero wallet commands from [here](https://github.com/monero-project/monero/wiki/monero-wallet-cli-commands) -* Start the Wallet RPC and leave it running in the background. This can be accomplished by running `monero-wallet-rpc --wallet-file /path/to/wallet/file --password walletPassword --rpc-bind-port 18082 --disable-rpc-login` where "/path/to/wallet/file" is the wallet file for your monero wallet. 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 --wallet-file /path/to/wallet/file --password walletPassword --rpc-bind-port 18082 --disable-rpc-login` where "/path/to/wallet/file" is the wallet file for your Monero wallet. 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. ## Step 4: Setup Monero Gateway in Prestashop * Navigate to the "Modules and Services" panel in the Prestashop sidebar and identify `Monero Payments` module and click on `configure`. diff --git a/modules/monero/controllers/front/payment.php b/modules/monero/controllers/front/payment.php index 97df69c..930e267 100644 --- a/modules/monero/controllers/front/payment.php +++ b/modules/monero/controllers/front/payment.php @@ -95,7 +95,7 @@ public function changeto($amount, $currency) { $xmr_live_price = $this->retriveprice($currency); $new_amount = $amount / $xmr_live_price; - $rounded_amount = round($new_amount, 12); //the moneo wallet can't handle decimals smaller than 0.000000000001 + $rounded_amount = round($new_amount, 12); //the Monero wallet can't handle decimals smaller than 0.000000000001 return $rounded_amount; } diff --git a/modules/monero/controllers/front/validation.php b/modules/monero/controllers/front/validation.php index cbfddb2..610d04c 100644 --- a/modules/monero/controllers/front/validation.php +++ b/modules/monero/controllers/front/validation.php @@ -64,7 +64,7 @@ public function changeto($amount, $currency) { $xmr_live_price = $this->retriveprice($currency); $new_amount = $amount / $xmr_live_price; - $rounded_amount = round($new_amount, 12); //the moneo wallet can't handle decimals smaller than 0.000000000001 + $rounded_amount = round($new_amount, 12); //the Monero wallet can't handle decimals smaller than 0.000000000001 return $rounded_amount; } diff --git a/modules/monero/library.php b/modules/monero/library.php index 2ca5d80..0a3039d 100644 --- a/modules/monero/library.php +++ b/modules/monero/library.php @@ -72,7 +72,7 @@ public function setCurlOptions($pOptionsArray) private function request($pMethod, $pParams) { static $requestId = 0; - // generating uniuqe id per process + // generating unique id per process $requestId++; // check if given params are correct $this->validate(false === is_scalar($pMethod), 'Method name has no scalar value'); @@ -174,7 +174,7 @@ protected function debug($pAdd, $pShow = false) // performance summary $debug .= 'Request time: ' . round($endTime - $startTime, 3) . ' s Memory usage: ' . round(memory_get_usage() / 1024) . " kb\r\n"; echo nl2br($debug); - // send output imidiately + // send output immediately flush(); // clean static $debug = $startTime = null; @@ -225,7 +225,7 @@ public function _print($json) } /* - * The following functions can all be called to interact with the monero rpc wallet + * The following functions can all be called to interact with the Monero RPC wallet * They will majority of them will return the result as an array * Example: $daemon->address(); where $daemon is an instance of this class, will return the wallet address as string within an array */ @@ -270,7 +270,7 @@ public function view_key() } /* A payment id can be passed as a string - A random payment id will be generatd if one is not given */ + A random payment id will be generated if one is not given */ public function make_integrated_address($payment_id) { $integrate_address_parameters = array('payment_id' => $payment_id);