Difference between revisions of "RolePay Time Clock Expansion"
(Added "clocked_in_count" API action) |
|||
(2 intermediate revisions by the same user not shown) | |||
Line 126: | Line 126: | ||
{ | { | ||
"success": "User has successfully been clocked out." | "success": "User has successfully been clocked out." | ||
+ | } | ||
+ | </pre> | ||
+ | |||
+ | |||
+ | == '''<span style="color:#4D5A93">Mass Payout</span>''' == | ||
+ | <p>This function will payout all users that are eligible for a payout.</p> | ||
+ | |||
+ | === Information required for API call === | ||
+ | * action (payout_everyone) | ||
+ | * api_key | ||
+ | |||
+ | === HTTP API Call === | ||
+ | <pre>http://rolepay.timeclock.mtp.onl/api/action/payout_everyone/api_key/{API_KEY} GET</pre> | ||
+ | |||
+ | === Example Response === | ||
+ | <pre> | ||
+ | { | ||
+ | "success": [{"paid":"johnny nexen"}] | ||
+ | } | ||
+ | </pre> | ||
+ | |||
+ | |||
+ | == '''<span style="color:#4D5A93">Payout User</span>''' == | ||
+ | <p>This function will payout the specified user.</p> | ||
+ | |||
+ | === Information required for API call === | ||
+ | * action (payout_user) | ||
+ | * api_key | ||
+ | * user_uuid (The user you're wanting to pay out) | ||
+ | |||
+ | === HTTP API Call === | ||
+ | <pre>http://rolepay.timeclock.mtp.onl/api/action/payout_user/api_key/{API_KEY}/user_uuid/{USER_UUID} GET</pre> | ||
+ | |||
+ | === Example Response === | ||
+ | <pre> | ||
+ | { | ||
+ | "success":"johnny nexen was successfully paid $27." | ||
+ | } | ||
+ | </pre> | ||
+ | |||
+ | |||
+ | == '''<span style="color:#4D5A93">Clocked-in Count</span>''' == | ||
+ | <p>This function will fetch the number of users currently clocked-in.</p> | ||
+ | |||
+ | === Information required for API call === | ||
+ | * action (clocked_in_count) | ||
+ | * api_key | ||
+ | |||
+ | === HTTP API Call === | ||
+ | <pre>http://rolepay.timeclock.mtp.onl/api/action/clocked_in_count/api_key/{API_KEY} GET</pre> | ||
+ | |||
+ | === Example Response === | ||
+ | <pre> | ||
+ | { | ||
+ | "success":"There are currently 6 users clocked-in.", "total":"6" | ||
} | } | ||
</pre> | </pre> | ||
Line 131: | Line 186: | ||
= '''<span style="color:#4D5A93">Changelog</span>''' = | = '''<span style="color:#4D5A93">Changelog</span>''' = | ||
− | |||
− | |||
<b><span style="color:red">** UPGRADE INSTRUCTIONS **</span></b> | <b><span style="color:red">** UPGRADE INSTRUCTIONS **</span></b> | ||
− | <p>If you already have a | + | <p>If you already have a Timeclock 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 timeclock. (The Network Key begins with an '@' character, followed by 36 characters)<br/><b>Once you have copied the network key</b>, you can paste the key into the description field of the new timeclock. Once set, left-click the timeclock and it should automatically connect to your network.</p> |
+ | |||
+ | * <b><u>Version: 1.4</u></b>: | ||
+ | * <b>Fixed:</b> An issue preventing Dashboard access. | ||
+ | |||
+ | |||
+ | * <b><u>Version: 1.3</u></b>: | ||
+ | * <b>New:</b> Moved to new server | ||
Line 144: | Line 204: | ||
* <b><u>Version 1.1</u></b>: | * <b><u>Version 1.1</u></b>: | ||
− | |||
* <b>New Feature:</b> Admin login; you can now assign admins and allow them access to the dashboard. | * <b>New Feature:</b> Admin login; you can now assign admins and allow them access to the dashboard. | ||
* <b>New Feature:</b> Time Conditions; set specific working hours a person can work for each day of the week. | * <b>New Feature:</b> Time Conditions; set specific working hours a person can work for each day of the week. | ||
* <b>Fixed:</b> Auto-Clockout; users with 'auto-clockout' enabled should now be properly clocked out when they go offline. | * <b>Fixed:</b> Auto-Clockout; users with 'auto-clockout' enabled should now be properly clocked out when they go offline. |
Latest revision as of 14:43, 24 February 2021
← 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:
- Locate the Time Clock in your inventory and rez into place
- Left-click the Time Clock to receive the dialog menu & select "Setup"
- A URL dialog will be presented, offering you a link to the online device registration page
- Once on the registration page, input a RolePay API key and select "Validate"
- 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) - 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:
- 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.
- 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." }
Mass Payout
This function will payout all users that are eligible for a payout.
Information required for API call
- action (payout_everyone)
- api_key
HTTP API Call
http://rolepay.timeclock.mtp.onl/api/action/payout_everyone/api_key/{API_KEY} GET
Example Response
{ "success": [{"paid":"johnny nexen"}] }
Payout User
This function will payout the specified user.
Information required for API call
- action (payout_user)
- api_key
- user_uuid (The user you're wanting to pay out)
HTTP API Call
http://rolepay.timeclock.mtp.onl/api/action/payout_user/api_key/{API_KEY}/user_uuid/{USER_UUID} GET
Example Response
{ "success":"johnny nexen was successfully paid $27." }
Clocked-in Count
This function will fetch the number of users currently clocked-in.
Information required for API call
- action (clocked_in_count)
- api_key
HTTP API Call
http://rolepay.timeclock.mtp.onl/api/action/clocked_in_count/api_key/{API_KEY} GET
Example Response
{ "success":"There are currently 6 users clocked-in.", "total":"6" }
Changelog
** UPGRADE INSTRUCTIONS **
If you already have a Timeclock 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 timeclock. (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 timeclock. Once set, left-click the timeclock and it should automatically connect to your network.
- Version: 1.4:
- Fixed: An issue preventing Dashboard access.
- Version: 1.3:
- New: Moved to new server
- 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.