Copyright © 2016 All Rights Reserved

# Viavi Streaming Script | Documentation

### Installation

#### Server Requirements

Checking to ensure that your web host have the minimum requirements to run Viavi Streaming Script.

- PHP >= 7.2.0
- BCMath PHP Extension
- Ctype PHP Extension
- JSON PHP Extension
- Mbstring PHP Extension
- OpenSSL PHP Extension
- PDO PHP Extension
- Tokenizer PHP Extension
- XML PHP Extension
- Fileinfo PHP Extension
- HTTP Extension
- Curl PHP Extension

### Unzip and Upload

Extract the archive you have downloaded. Copy all files from video_script folder and upload to your server.

Note: Make sure .env and .htaccess extract properly. If you did't know where is env file then please check File Structure

### The following quick steps show how the installation progress.

### Step 1

Run your site or sub domain http://yoursite.com

Minimum Requirements

You should now see the minimum system requirements checklist - If there are any issues with the checklist, you will need to fix that before you can proceed to the next step.

### Step 2

Verifying Purchase

> Where can I find my purchase code? please read this.

Here you have to enter your Envato username and Item Purchase code.Then click Verify.

### Step 3

Database Configuration

Enter your database host, database user, database password and database name.

Then click Import, If everything goes well, you should see this page.

Database import step take sometime, So don't do anything when database import.

### Step 4

Finish Installation

Congratulations! Viavi Streaming Portal is successfully installed.

### Admin Access

Go to http://yoursite.com/admin after successfully configuration

We created an admin account for you by default
Email: admin@admin.com
Pass: admin

### Site Configuration

To set the site name, logo etc. go to Admin > Settings > General Settings.

Main Configuration

Following informations needed to be updated.

- Site Logo - Pick a png logo.
- Site Favicon - Favicons like site icon. Pick a png icon
- Site name - Your site name and this is important for search engines
- Site email - When you send email that email shown to user.
- Site Description - Type some detail about your site.

You can also configure Timezone, Language, Styling and etc in here.

### Mail Configuration

So if you want to enable mail sending. Please go to Admin > Settings > SMTP Email

If you have problem with mailing with this setup than please contact your provider with those variables and ask correct info. We recommended use your hosting SMTP email settings.

For Gmail SMTP setup settings

SMTP username: Gmail email address
SMTP password: Gmail password
SMTP server address: smtp.gmail.com
Gmail SMTP port (TLS): 587
SMTP port (SSL): 465
SMTP TLS/SSL required: Select TLS or SSL

NOTE: You have to set less secure apps access your account, Read more

### Social Login Configuration

So if you want to enable social login. Please go to Admin > Settings > Social Login

Create Google App

In this step we need google client id and secret that way we can get information of other user. so if you don't have google app account then you can create from here : Google Developers Console. you can find bellow screen :

Now you have to click on Credentials and choose first option oAuth and click Create new Client ID button. now you can see following slide:

Set Authorized redirect URL: http://yourdomainname.com/auth/google/callback

after create account you can copy client id and secret.Now you have to set Client ID and Secret in admin

Create Facebook App

Open a new tab in your browser and go to https://developers.facebook.com. Now enter the login details and click on get started option which you can find in the navigation bar. A popup box will appear as shown below.

Now Click on create the first app custom Facebook login button to get started.

Now it will ask to enter the display name for your App. Enter a display name and your contact email. Now click on create App ID. you will now end up with the Facebook developer dashboard.

Now click on Facebook login card to setup. It will ask you the login options to generate.

we will be using the web option. Now click on the web and it will ask you to fill the basics information

Once we are done with the form. Now navigate to facebook login > setting which you can find in side navigation bar to set the redirect URI. Set redirect URI: https://yourdomainname.com/auth/facebook/callback

NOTE: As of October 6, 2018, you won’t be able to use Facebook Login if your site isn’t HTTPS, or you will run into errors when trying to authenticate users.

and click on save changes. now click on setting > basic to get the App ID and Secret key.

Now we get the Facebook App ID and Secret Key. Now you have to set Client ID and Secret in admin

### Payment Configuration

Now you need to setup the PayPal, Stripe, Razorpay and Paystack key. go to Admin > Settings > Payment

PayPal
Create or edit sandbox and live apps

1. Log into Dashboard and type your PayPal account email and password.

2. On the My Apps & Credentials page, toggle to Live or Sandbox depending on which kind of app you want to create or edit:

   - To create an app, click Create App in the REST API apps section. Type a name for your app and click Create App.

   - To edit an app, click a link for an app in the App Name column in the REST API apps section. To change the app's name, click the pencil icon, type a name for your app, and click Create App.

3. Copy and save your API credentials — the client ID and secret set on admin.

For more info click here

Stripe
Stripe Secret Key and Publishable key

Users with Administrator permissions can access a Stripe account’s API keys by navigating to the Developers section of the Stripe dashboard and clicking on API Keys.

Razorpay
API Keys

API key is a combination of the key_id and key_secret and is required to make any API request to Razorpay. You also have to implement the API key in your code as part of your integration process.

1. Log into your Dashboard with appropriate credentials.
2. Select the mode (Test or Live) for which you want to generate the API key.

   > Note:
   > You have to generate separate API Keys for the test and live modes. No real money is used in test mode.

3. Navigate to Settings → API Keys → Generate Key to generate key for the selected mode.

The Key Id and Key Secret appear in a pop-out window as shown below:

Paystack
How to get your Test and Live API Keys

In order to get your Test API Keys, simply go to your dashboard settings and click on the API Keys & Webhooks tab. Scroll to where it says "API Configuration - Test Mode", here you will find your Test Secret Key and Test Public Key as captured below:

After you're done testing and are satisfied with your integration, you'll need your Live API Keys to be able to receive real money from your customers.

Callback URL

The callback URL is a web address of where you want your customers to be redirected to after a successful payment is made. Set Callback URL: https://yourdomainname.com/payment/callback

### Android App Configuration

App Verify Purchase

Verify purchase required for app API and after verify you can access other app settings page.

### File Structure

.env and .htaccess configuration files are located here

`video_script`

All layout files are located here

`video_script\resources\views`

All layout language files are located here (Translation file words.php)

`video_script\resources\lang`

### Frequently Asked Questions (FAQ)

#### Can I run on My Server?

If you have all requirements on your server then yes you can run!. Please check requirements Installation tab

#### Can I use this on more than one domain?

With purchase license you have one domain permission. You need to get another licenses for your another domians if you want to use on more than one domain.

#### Issue: Parse error: syntax error, unexpected 'class' (T_CLASS), expecting > identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in

This means you do not have PHP 7.2.0 or newer version. Script needs PHP 7.2.0 or newer version.

#### Issue: I'm Getting 500 Server Error

It could be anything. Its a server error. Could be missing files Or missing server configuration. It may be permission issue too. If so please try to set 777 permission for storage and bootstrap folder and all folders and files on it.

### License

#### Regular License

Use, by you or one client, in a single end product which end users are not charged for.