Difference between revisions of "RolePay Time Clock Expansion"

From Nexus
Jump to: navigation, search
m
Line 62: Line 62:
  
 
=== HTTP API Call ===
 
=== HTTP API Call ===
<pre>http://rolepay.timeclock.morethanpixels.rocks/api/action/check_key/api_key/{API_KEY} GET</pre>
+
<pre>http://rolepay.timeclock.mtp.onl/api/action/check_key/api_key/{API_KEY} GET</pre>
  
 
=== Example Response ===
 
=== Example Response ===
Line 82: Line 82:
  
 
=== HTTP API Call ===
 
=== HTTP API Call ===
<pre>http://rolepay.timeclock.morethanpixels.rocks/api/action/register_user/api_key/{API_KEY}/user_uuid/{USER_UUID}/wage/{USER_WAGE} GET</pre>
+
<pre>http://rolepay.timeclock.mtp.onl/api/action/register_user/api_key/{API_KEY}/user_uuid/{USER_UUID}/wage/{USER_WAGE} GET</pre>
  
 
=== Example Response ===
 
=== Example Response ===
Line 101: Line 101:
  
 
=== HTTP API Call ===
 
=== HTTP API Call ===
<pre>http://rolepay.timeclock.morethanpixels.rocks/api/action/clock-in_user/api_key/{API_KEY}/user_uuid/{USER_UUID} GET</pre>
+
<pre>http://rolepay.timeclock.mtp.onl/api/action/clock-in_user/api_key/{API_KEY}/user_uuid/{USER_UUID} GET</pre>
  
 
=== Example Response ===
 
=== Example Response ===
Line 120: Line 120:
  
 
=== HTTP API Call ===
 
=== HTTP API Call ===
<pre>http://rolepay.timeclock.morethanpixels.rocks/api/action/clock-out_user/api_key/{API_KEY}/user_uuid/{USER_UUID} GET</pre>
+
<pre>http://rolepay.timeclock.mtp.onl/api/action/clock-out_user/api_key/{API_KEY}/user_uuid/{USER_UUID} GET</pre>
  
 
=== Example Response ===
 
=== Example Response ===

Revision as of 10:11, 8 April 2019

← Rolepay Money System Expansion Packs

Using Expansion Packs

In order to use any expansion pack, you must have an API key only obtained from the Web Interface from the RolePay Server.
You can also obtain an API key from the network owner or someone who has access to the Web Interface.


Making Expansion Packs

Want to learn how to make expansion packs? All expansion packs are made using the RolePay Money System API.
All you will need is basic knowledge of HTTP and LSL.


Setting Up The Time Clock Expansion

These steps assume that you already have an API key.
Follow these steps to configure your device:

  1. Locate the Time Clock in your inventory and rez into place
  2. Left-click the Time Clock to receive the dialog menu & select "Setup"
  3. A URL dialog will be presented, offering you a link to the online device registration page
  4. Once on the registration page, input a RolePay API key and select "Validate"
  5. If successfully validated, you can then select the funding source which will be the funding used to complete payouts.
    You can either input a credit card number belonging to the RolePay network that you're connecting to or use network funds (please ensure you have permission from the network owner)
  6. Once funding has been validated, you will be directed to the Time Clock dashboard and your Time Clock is ready for use!


User Registration & User Options

To add users to the Time Clock, you will need to visit the Time Clock's online dashboard. To do this, left-click the Time Clock & select "Dashboard" from the menu.
Once you've accessed the dashboard, navigate to the "Users" tab. On the left, enter the Second Life username and the hourly wage for the user you'd like to register and select "Add User". The users name will then appear to the right of the registration box if the user was successfully registered.

Selecting a registered user from the Registered Users list will display the users unpaid/paid earnings and allow you to edit the following settings:

  • Rate/HR: Set the $ amount that the user will earn per hour clocked in
  • Auto Clockout: Check the box if you wish to enable the Auto Clockout feature; this feature will monitor the status of clocked in users & will automatically clock out those that go offline.
    • Please Note: This feature requires additional configuration to the Time Clock in-world. More instructions will become available on the interface once you've enabled Auto Clockout for one or more users
  • Work Days: Allows you to check the boxes of the week days the user is permitted to work. Note: The system conducts midnight checks; if the user is not permitted to work the new day, they'll be clocked out automatically



Clocking In

Once a user has been registered to the Time Clock, they'll have access to the Time Clock. When left-clicked, a menu will be provided which will give them the option to view their stats and option to clock-in/out.


Clocking Out Users

On the "Home" dashboard page, any users that are currently clocked in will be listed there. You will be able to see when each person started with the option to clock out the user. When a user is clocked out, the system will calculate their total earnings and add it to the users unpaid earnings. Note: Regardless if the user has been clocked out manually or automatically by the system (ex. Auto clockout) - The users clocked time will always be added to their unpaid earnings which then allows those unpaid earnings to be paid out.


Payouts & Records

There are two payout options available:

  1. Manual Payouts by Owner: If you would like to manually payout time for each user, you can do so by visitng the "Users" page on the Time Clock dashboard. Simply select the user, followed by "Payout". If the Payout option is not clickable, the user has no unpaid earnings to payout.
  2. Manual Payouts by User: To allow users the ability to request payouts themsevles, navigate to the "Settings" page on the Time Clock dashboard & enable "Allow Manual Payout"; users will then be able to request payouts for their unpaid earnings via the Time Clock menu.

Each time a payout has been completed, a new record will be made on the "Payouts" page. Each record consists of the following details: Date & Time, Payee, Funding Source, and the Amount paid.


Updating Time Clock Configuration

Navigate to the "Settings" page on the online Time Clock dashboard. There you are able to change the RolePay API key & funding source details.


API Documentation

In order to use the Time Clock API, you must first get an API key from the Time Clock Dashboard, "API Keys" page.


API Features

  • Check Key (Checks to make sure an API key is valid and exists)
  • Register User (Registers user into the Time Clock network)
  • Clock-in User (Clocks in specified user into the Time Clock network)
  • Clock-out User (Clocks out specified user from the Time Clock network)


Check API Key

This function will check to see if the specified API Key exists and is valid.

Information required for API call

  • action (check_key)
  • api_key

HTTP API Call

http://rolepay.timeclock.mtp.onl/api/action/check_key/api_key/{API_KEY} GET

Example Response

{
    "success": "api_key found"
}


Register User

This function will register the specified user to the Time Clock network.

Information required for API call

  • action (register_user)
  • api_key
  • user_uuid (The user to register)
  • wage (The users hourly wage)

HTTP API Call

http://rolepay.timeclock.mtp.onl/api/action/register_user/api_key/{API_KEY}/user_uuid/{USER_UUID}/wage/{USER_WAGE} GET

Example Response

{
    "success": "User has successfully been registered!"
}


Clock-In User

This function will clock-in the specified user.

Information required for API call

  • action (clock-in_user)
  • api_key
  • user_uuid (The user to clock-in)

HTTP API Call

http://rolepay.timeclock.mtp.onl/api/action/clock-in_user/api_key/{API_KEY}/user_uuid/{USER_UUID} GET

Example Response

{
    "success": "User has successfully been clocked in."
}


Clock-Out User

This function will clock-out the specified user.

Information required for API call

  • action (clock-out_user)
  • api_key
  • user_uuid (The user to clock-out)

HTTP API Call

http://rolepay.timeclock.mtp.onl/api/action/clock-out_user/api_key/{API_KEY}/user_uuid/{USER_UUID} GET

Example Response

{
    "success": "User has successfully been clocked out."
}


Changelog

  • Version: 1.3:
  • New: Moved to new server

** UPGRADE INSTRUCTIONS **

If you already have a Time Clock set up and would like to continue using that network, you'll have to copy the network key located in the description field of your old time clock. (The Network Key begins with an '@' character, followed by 36 characters)
Once you have copied the network key, you can paste the key into the description field of the new time clock. Once set, left-click the time clock and it should automatically connect to your network.


  • Version: 1.2:
  • Fixed: Fixed security issue with URLs


  • Version 1.1:
  • New Feature: Admin login; you can now assign admins and allow them access to the dashboard.
  • New Feature: Time Conditions; set specific working hours a person can work for each day of the week.
  • Fixed: Auto-Clockout; users with 'auto-clockout' enabled should now be properly clocked out when they go offline.