Skip to content

Commit

Permalink
Merge pull request #8 from rex4539/fix-typos
Browse files Browse the repository at this point in the history
Fix typos
  • Loading branch information
serhack authored May 21, 2018
2 parents a9fad32 + 4148b9f commit a90f513
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -20,25 +20,25 @@ 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
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.

`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`.
Expand Down
2 changes: 1 addition & 1 deletion modules/monero/controllers/front/payment.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion modules/monero/controllers/front/validation.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
8 changes: 4 additions & 4 deletions modules/monero/library.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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
*/
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit a90f513

Please sign in to comment.