Setup (Node.JS & Block.io)

Note: CryptoCurrencies will only work on Pay Money v2.7.

The following two things are necessary for allowing Pay Money to process cryptocurrencies:

 A) Node.JS (installed on the Pay Money hosted server)

Note: At the time of writing, v12.16.1 is the latest stable release of Node.JS

 B) Block.io Account

A) INSTALLING NODE.JS AND NPM

1) You need SSH access to install node.js and npm (Ask your hosting provider if you don’t have access to it)

2) Log in to your account using SSH.

3) At the command prompt, type the following commands:

cd ~
wget https://nodejs.org/dist/v12.16.1/node-v12.16.1-linux-x64.tar.xz

4) To extract the Node.js files, type the following command:

tar xvf node-v12.16.1-linux-x64.tar.xz

5) To rename the extracted folder to the more convenient Node.JS name, type the following command:

mv node-v12.16.1-linux-x64 nodejs

6) To install the node and npm binaries, type the following commands:

mkdir ~/bin
cp nodejs/bin/node ~/bin
cd ~/bin
ln -s ../nodejs/lib/node_modules/npm/bin/npm-cli.js npm

After you run the above commands, Node.js and npm are installed on your hosting server. To verify this, type the following commands:

node --version
npm --version

Alternatively, 

If you have SSH but no root access, you can use NVM (https://github.com/creationix/nvm), which makes it easy to install and manage different node versions.

1) Log in to your account using SSH.

2) At the command prompt, type the following commands:

cd ~
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.2/install.sh | bash

3) Immediately after installing NVM, you may need to run:

source ~/.bash_profile

4) List available node version:

nvm list-remote

5) Install node version:

nvm install v12.16.1

6) Use the node version:

nvm use v12.16.1

After you run the above commands, Node.js and npm are installed on your hosting server. To verify this, type the following commands:

node --version
npm --version

B) Block.io Account

1) Currently, Block.io supports 3 coins/networks – BITCOIN, DOGECOIN & LITECOIN.

You can also use their TESTNETS (for testing purposes, as these will not perform real transactions).

So, to create an account, go to https://block.io and click on “SIGN Up” (on the top right)

2) Enter your email, password and confirm the password

3) You will then be redirected to a confirmation code page. Check your email that you have used for signup and enter the confirmation code.

 

3) You will then be redirected to the “Account Tier” Page. This is is a crucial step. If you choose “The Newbie” tier, only 10 wallet address is allowed per network.


3) For demo purposes, I will be using “The Newbie” tier.

You will then need to log in again to your block.io account. Once you log in, you will see the below “Set your secret pin” page. Enter your pin (8+ character long) carefully and keep it to a safe place.

Note: Please do not share your PIN with anyone else.

 

3) Once you finish entering the secret pin, a secret mnemonic popup will appear. Read it carefully and proceed.

3) You will then be redirected to the Block.io landing page. Read it carefully too.

3) Each Network/Coin will have a default wallet address. You can use this as your Pay Money Merchant/Admin address.

At the time of writing Block.io gave 0.25000000 LT (Litecoin (TESTNET!)) and 500 DG (Dogecoin (TESTNET!))on my account.

You can either use that or send an amount from an external address(outside block.io) to the default address of one of your TESTNET networks (example – Dogecoin (TESTNET!)). 

 

This is required as the merchant/admin address might send cryptocurrency amount to users’ wallet address (which will be generated against the network API key that merchant provides in Pay Money).

REFERENCES:-

a2hosting.com/kb/installable-applications/manual-installations/installing-node-js-on-managed-hosting-accounts#Installing-Node.js-and-npm

blogs.reliablepenguin.com/2019/01/26/nodejs-install-via-nvm-shared-hosting

https://block.io

Categories

© Copyright, Techvillage