# ProInvest Documentation

Last updated: July 13th, 2021

## Changelog

Update v3.5

- KYC Module View - Big Fix

Update v3.4

- Calculator - New
- Installation Issue - Bug Fix
- Perfect Money Setup - Bug Fix

Update v3.3

- Referral Distribution Issue - Bug Fix
- Tawk Setup - Bug Fix

Update v3.2

- New Template - New
- Allow user to disable frontend templates - New
- Set default language - New
- Referrals List - New
- Add deposit manager role - Bug Fix

Update v3.1

- Recaptcha addition on contact us forms - New
- Timezone support - New
- Coinbase Commerce Payment Method - Bug Fix
- KYC Pagination Issue - Bug Fix
- Withdrawal method issue - Bug Fix

- To fix, delete current perfect money/paystack/payeer/coinbase method and create new one.

- Language translation in other sections
- KYC ProInvest name removal - Bug Fix
- PNG|PDF|JPG upload issue for bank transactions - Bug fix
- Delete payment methods - Bug Fix

Update v3.0

- Coinbase Commerce Payment Method - New
- Perfect Money Payment Method - New
- Withdrawal Fees Feature - New
- KYC Feature - New
- Languages(Português, Español & German) - New
- Coinpayments Payment Method - Bug Fix
- Web builder (Unable to edit) - Bug fix

Update v2.4

- Reset password issue - Bug Fix
- User wallet (Users can invest and withdraw from wallet amount) - New
- Withdrawal issue - Bug fix

Update v2.3

- Web builder endless loading - Bug Fix
- Profile picture change - Bug fix
- Coinpayments incorrect QR code issue - Bug fix

Update v2.2

- SMTP Email Setup documentation - New
- Email Template change documentation - New
- Investment plans business days issue - Bug fix
- Referrals error - Bug fix

Update v2.1

- Installation issue - Bug fix

Update v2.0

- Language Translation module - New
- Support tickets module - New
- Payeer payment method - New
- Paystack payment method - New
- Tawk chat plugin - New
- Google Authenticator - New
- Authy Authenticator - New
- Google Recaptcha - New
- Frontend Editor - New
- Offline payment methods support - New
- Reinvest & withdrawal button - Bug fix

Update v1.3.4

- 404 pages installation error fix
- Password change feature in profile
- Delete user feature

Update v1.3.3

- Bug fixes

Update v1.3.2

- Bug fixes

Update v1.3.1

- Paypal integration switch to live error -- Bug fix

ProInvest Version 1.3

- Paypal integration -- New
- Twilio SMS integration -- New
- New email setup option [SMTP Protocol] -- New
- Allow user to select plan during reinvestment -- New
- New deposit mobile responsive -- Bug fix
- Offline Bank Transfer Option -- Bug fix
- Coinpayments IPN (auto-deposit) issue -- Bug fix

ProInvest Version 1.2

- Dynamic currency change and dollar exchange rate -- New
- Automatic emails on earnings cron jobs -- New
- Email templates & payment API/methods select loader -- New
- Offline Bank Transfer Option -- New
- Dynamic favicon change -- New
- New deposit -- Bug fix
- Client counter -- Bug fix

ProInvest Version 1.1

- XSS filtering -- Bug fix
- Error pages -- New

ProInvest Version 1.0

- Initial Proinvest Platform

## Updating Previous Installation v3.3 - v3.4

To update your ProInvest Platform please follow the steps below:

`Before you start the upgrade ensure that you backup your database and your public_html folder incase anything breaks.` `You will also need to have your Envato purchase code in order to run the update successfully (from version 2.4)`

1. Go to your current server installation and navigate to application/config/database.php
2. Save the file
3. Go to uploads and save the folder in another directory
4. Copy the other contents from the update folder to your server.
5. Replace application/config/database.php with the database.php file that you copied in step 1
6. Replace uploads with the uploads folder that you saved in another directory
7. Go to phpmyadmin and import the database file located in database/migration(3.3-3.4).sql
8. Go to your domain and test if everything works okay.

`Upon succesful upgrade. If you were using Tawk before, please scroll down to Tawk setup to setup your Tawk plugin again.`

## Installation

This installation covers installs via cPanel or FTp client. You can jump to the section that is preferable to you.

### cPanel Install

1. Upload the zip file to `public_html` in cPanel
2. Unzip it using cPanel tools
3. Ensure that the main folders under cPanel are application, system, etc and not proinvest
4. Go to `/application/config/database.php` and change permissions to 777
5. Ensure that the `.htaccess` file was unzipped/copied to your root folder
6. Go to the main cPanel page and scroll down to DATABASES
7. Click MySQL Databases
8. Create new database by putting database name and then clicking create database button
9. After database has been created, go back to the previous page and scroll down to Add New User
10. Add username and password (make sure you save the password because you will need it)
11. Once the user has been created, go back to the previous page and again scroll down to Add User To Database
12. Select the database name and user that you created above
13. Click 'Add' button and in the next page tick ALL PRIVILEGES box and then scroll down and click Make changes button
14. Once complete, you can go back to the previous page and scroll down to Current Databases to confirm that your new database has been connected to the new user you've created

On successful completion, proceed to Database Configuration below.

### FTP Install

1. Unzip the folder to a directory locally
2. Copy the internal folder structure i.e application, system, assets etc to your site via the FTP client
3. Change the permissions for `/application/config/database.php` to 777
4. Ensure that the `.htaccess` file was unzipped/copied to your root folder

On successful completion, proceed to Database Configuration below.

### Database Configuration

Go to your main url e.g. `http://YOUR_URL` which should redirect you to the database installation page. You can now put the information obtained above plus your envato purchase code to run the installer.

Upon succesful installation (Your domain now directs you to the script and all pages are working), make sure that you go back to cPanel or your FTP and DELETE the folder named `install`for your server security

### Trouble Shooting

In the event that the installer does not work, please check whether you have an active internet connection. Also ensure that you have a SQL client installed. If you still face issues, please contact support at support@axis96.co.

### .htaccess Error

In the event that the .htaccess file is not unzipped directly to your folder, you will face this error. Since it is a dot file, .htaccess might be hidden in some systems, we've documented how to check for it below:

- Cpanel

- Go to File Manager (Files Section)
- Click the top-right Settings button.
- Then on the Preferences window, check the option Show Hidden Files (dotfiles)
- Confirm the action by clicking the Save button
- Now you will see all hidden files (including .htaccess files) in File Manager.

- Once you have confirmed that you can view dot files, check for .htaccess file in root folder (where application was unzipped to)
- If it is not there, please create a .htaccess file in the root folder and add the following to it:
`DirectoryIndex index.php
RewriteEngine on
RewriteCond $1 !^(index\.php|(.*)\.swf|forums|images|css|downloads|jquery|js|robots\.txt|favicon\.ico)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?$1 [L,QSA]`
- Save the .htaccess file and then go back to the installer and click continue.

If this does not work, please contact support at at support@axis96.co.

### FAQs

Please go through the FAQs documented here (https://codecanyon.net/item/proinvest-cryptocurrency-and-online-investment-platform/25241549/support) if you have any issues.

## Getting Started

Go to `http://YOUR_URL/login` and login with the following credentials

- email: `admin@proinvest.com`
- Password: `12345678`

On successful login navigate to `Settings > General Settings`

### Company Information

Replace the default data with your own data.

### Site Settings

Naavigate to the `Site Settings` tab. In this tab replace the values with your own. This information is important for proper indexing of your site and SEO. You can also add your chat widget code if available.

### Email & SMS Settings

Your email settings can be obtained from your hosting provider (or other external mail hosting provider). They are essential for sending out your email notifications. For SMS settings please refer to the Twilio API below.

### Setting up email

1. Obtain SMTP settings from your hosting provider
2. Confirm with your hosting provider that ports 25, 80, 465 or 587 is open and can be used for sending out emails
3. Enter SMTP Host given in the respective field e.g smtp@googlemail.com
4. Enter port (25, 2525, 80, 465 or 587) e.g 25
5. Select SMTP protocol as SMTP eg. SMTP
6. Enter SMTP user email (email address created for sending out emails) e.g johndoe@gmail.com
7. Enter password for your account e.g 12345678
8. Activate email and save the changes
9. Run a test by sending out an email

Please note, if you are setting up gmail, you will need to turn on access to less secure apps in your gmail settings in order for emails to be sent

`Please note that some shared hosting providers disable their outgoing ports. You should confirm with your hosting provider whether you can send out emails with their SMTP settings.`

### Email Templates Settings

#### Changing logo

1. Click `</>` to toggle code view
2. From the top look for the following line `<img src="https://proinvest.axis96.co/uploads/logo-white.png" alt="logo-white.png">`
3. Replace `src="https://proinvest.axis96.co/uploads/logo-white.png"` with the link to your own logo
4. Toggle code view `(</>)` and confirm if the changes have been effected
5. Click save

### Earnings Settings

Allows you to configure your referral earnings easily

### KYC Verification Settings

ProInvest allows you to activate or deactivate KYC support for your account. You need to turn it on so that people can go through the KYC process.

### Investment Plans

In order for clients to transact using the system, you will need to setup your preferred investment plans by going to `Investment Plans`

Here you can add new plans, view all your plans, edit and delete plans as per your need.

### Team

ProInvest supports role based access to your team members. To set up new users navigate to `Users > Team`. Here you can create an employee account and give them access to specific pages, edit their accounts or deactivate them when need arises.

### Cron Jobs

In order for your clients to receive automated emails on earnings, you will need to set up cron jobs in your hosting provider. For setting up cron jobs on cPanel, follow these steps:

1. Log in to cPanel, scroll down to the Advanced section and click the Cron Jobs icon.
2. Scroll down to the Add New Cron Job section. You can either select from the Common Settings drop down menus or fill out your own custom values. (Advisable to set it to once every 5 minutes)
3. Enter the command `wget http:/YOURURL/emailcronjob` and click Add New Cron Job.

A confirmation will appear to confirm that the job has been added.

If you are not using cPanel, please contact your hosting support on how to setup cron jobs.

Please contact support@axis96.co for support if you are having any issues.

## Payments API Config

Before you start receiving payments automatically on your app. You will have to first setup the Stripe and CoinPayments settings.

Navigate to `Settings > Payment APIs` and select the API that you want to configure as outlined below

### Stripe API config

For you to configure Stripe, you will need a `Public Key` and a `Private Key` from your Stripe Account. Follow these steps in order to obtain these keys

1. Login to Stripe.com (Sign up if you don't have an account)
2. On succesful login you should be redirected to the dashboard where you will see a prompt to `Get your live API keys` (You will have to activate your account first)
3. Copy the Publishable Key and paste in in Public Key on your Stripe API Settings side panel and then copy the Secret Key and paste it on Secret Key
4. Before saving, ensure that you have activated the API by changing the status to active.
5. Finally, go to `Settings > Payment Methods`, click on Stripe update and change the status to active on the side panel.
6. On succesful reload, the Stripe payment method should be labelled active and you should be able to receive payments via Stripe

### CoinPayments API

In order for you to accept crypto payment, you will need to obtain a public and private key from the CoinPayments site as outlined below.

1. Create an account at coinpayments.net
2. While in Coinpayments obtain the following information that you will use in the next step:
   - API Keys (Both public and secret keys) (https://www.coinpayments.net/index.php?cmd=acct_api_keys)
   - Coinpayment Merchant ID (https://www.coinpayments.net/acct-settings)
   - IPN Key (https://www.coinpayments.net/acct-settings)
3. Go back to the Proinvest Platform and navigate to settings > Addons APIs and then click on update under Coinpayments API
4. In the Coinpayments form fill in the public key, secret key, merchant ID and IPN Key with the values that you obtained above. In `IPN URL` input field input a unique code (Not a URL) where Coinpayments will send notifications whenever a transaction is succesfully confirmed on the blockchain. Make sure you activate the API.
5. Proceed to `Settings > Payment Methods` and then activate the crypto payments that you would want to use by clicking update and changing the status on the side panel.
6. To carry out test transactions, select Litecoin Testnet and activate it (This is a test coinpayments coin, you can obtain free credits here https://www.coinpayments.net/login?return=acct_req_ltct)
7. Go to your coinpayments here https://www.coinpayments.net/acct-coins and activate Litecoin Testnet (LTCT)
8. Go to client account and test your settings by using the Litecoin Testnet.
9. When the LTCT address comes up go to your coins wallet in coinpayments, select Testnet and then send to the address that came up. When successfully confirmed, you will receive an email from both coinpayments and your own site.

If you have succesfully setup all these steps, then your Coinpayments is now ready to be used

`NB: Remember to deactivate the Litecoin Testnet Method`

### PayPal API

In order for you to accept PayPal payments, you will need to obtain the client ID and secret from your PayPal Developer account as outlined below.

1. Create or login to your PayPal developer account at https://developer.paypal.com/
2. Follow these steps on how to get your sandbox credentials (Client ID and secret) for testing purposes https://www.paypal.com/us/smarthelp/article/how-do-i-find-my-sandbox-api-credentials-ts1500
3. Go back to the ProInvest Platform, navigate to addons API > Paypal API and update the settings with the credentials obtained from step 2 above. `Make sure to set the mode to sandbox`
4. Proceed to `Settings > Payment Methods` and then activate PayPal by clicking update and changing the status on the side panel.
5. At this point you can carry out test transactions
6. Once you are comfortable with the functionality you can then decide to go live in your paypal account.(https://developer.paypal.com/docs/integration/paypal-here/sdk-dev/going-live/)

`NB: Once you go live remember to change the mode to Live`

If you have succesfully setup all these steps, then your PayPal is now ready to be used

### Twilio API

In order for you to send SMS notifications to your clients, you will need to obtain the `Account SID` and `Auth Token` from your Twilio account as outlined below.

1. Create or login to your Twilio account at https://twilio.com/
2. Once you have logged in, go to your Console dashboard to get your Account SID and Auth Token https://support.twilio.com/hc/en-us/articles/223136027-Auth-Tokens-and-How-to-Change-Them. Save these somewhere safe
3. Follow these instructions to get a Twilio phone number https://www.twilio.com/docs/usage/tutorials/how-to-use-your-free-trial-account#get-your-first-twilio-phone-number
4. Go back to the ProInvest Platform, navigate to addons API > Twilio API and update with the info obtained above.
5. Proceed to `Settings > General Settings` and go to the Email and SMS settings tab and input your Twilio SMS phone number that was obtained above in the `SMS Phone Number` field. Make sure to activate before saving.
6. After saving you can click on Send a test SMS to confirm if your account is functional

If you have succesfully setup all these steps, then your ProInvest instance can now send out SMS messages.

`NB: If you are using a Twilio trial account, SMS messages will only be sent to accounts that you have verified in the Twilio console. You will need to upgrade to send out SMS messages to unverified phone numbers.`

You are now good to go! If you need any support don't hesitate to contact us at support@axis96.co

### Google Authenticator

1. To secure user accounts during login, you can either user Google Authenticator or Authy(indicated below)
2. Activate the plugin and then go to settings > General settings and then the site settings tab.
3. Select Google Authenticator as the preferred two factor authenticator and activate

### Google Recaptcha

To setup Google Recaptcha follow the steps below:

1. Go to https://www.google.com/recaptcha/admin/create
2. Register a new site. You can use either recaptcha v2 or v3 (both are supported)
3. After successful creation, get your recaptcha keys i.e Site Key and Secret Key
4. Copy the keys and save them in the Google recaptcha field in ProInvest.

Make sure that you put the correct recaptcha type and corresponding keys.

### Authy

1. Please use these steps to create your own Authy API Key https://www.twilio.com/docs/authy/twilioauth-sdk/quickstart/obtain-authy-api-key
2. Afterwards, you can copy the key to the ProInvest field.
3. Navigate to Settings > General settings and then select the site settings tab.
4. Select Authy as the preferred two factor authenticator and activate

### Tawk

1. Create a Tawk account
2. Go to Settings and then Chat Widget
3. Copy the Direct Chat Link url
4. Paste the url in the Direct Chat Link field in Tawk Plugin Settings
5. Navigate to Settings > General settings and then select the site settings tab.
6. Select Tawk as the preferred chat plugin and activate

### Payeer

Create a Payeer account

Get the secret and merchant ID's from your Payeer account and save them in the corresponding ProInvest fields.

Once you've setup add the following urls in your Payeer account:

- Success url - https://YOURURL/payeer/success
- Fail url - https://YOURURL/payeer/cancelled
- Status url - https://YOURURL/payeer/ipn

### Paystack

Create a Paystack account

Get the public key and secret key from your Paystack account and save them in the corresponding ProInvest fields.

### Coinbase Commerce

1. Open a coinbase commerce account on commerce.coinbase.com
2. Go to settings and scroll down to API keys
3. Click reveal to show API Key and copy it to API Key field in ProInvest
4. Go back to coinbase settings and scroll down to Webhook subscriptions and then click Show shared secret to reveal secret key
5. Copy the secret key and paste it in Secret Key field in ProInvest
6. Go back to Coinbase and in the same area (Webhook subscriptions), click Add an endpoint
7. Add the following url https://YOUROWNURLHERE/coinbase/ipn and click save

You can now start using coinbase as a payment gateway on your ProInvest install.

### Perfect Money

1. Create a Perfect Money account
2. Login to your account an go to My Account
3. In the My Accounts card, copy the account code e.g. U1234678 based on the currency of choice.
4. Paste the account code to Payee Account in ProInvest
5. Add Payee name. This can be the name of your company and users will see this when making payments.
6. Go back to your Perfect Money account and Click 'Settings' from the top menu
7. Make up an 'alternate passphrase' and enter it in the settings form
8. Click 'Apply Changes'
9. Copy the alternate passphrase above and paste it in ProInvest under passphrase. Click Save.

You can now start using Perfect Money to process payments.