* OpenSRS - Odin Domain Management Plugin
*
* Copyright (C) 2017 by Tucows Co/OpenSRS.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.

=================================================
OpenSRS Odin Plugin	    	 	
Version: 1.3.1
Last Updated: Sept 11, 2017
Website: www.opensrs.com				
support: help@opensrs.com				
=================================================

Requirements:
	
	* PHP 5.5+
	* 'TCP port 55443 must be open both ways on the server for lookups and http(s) connections to OpenSRS API

=================================================
Summary
=================================================

OpenSRS Odin plugin allows resellers to fully manage and provision domain names with OpenSRS directly.
For more information on each TLD, please see the TLD reference chart.

TLD Reference Chart:
http://bit.ly/OpenSRS_TLD_Reference_Chart

Features:
	- Register or transfer gTLD and ccTLD
	- Handles gTLD ownership trade process
	- Manage domain contact details
	- Manage domain's name servers
	- Manage domain's lock/unlock security feature
	- Manage domain's contact privacy status
	- Automated/Manual renewal management for both gTLD and ccTLD
	- Revoke Domain if applicable (Admin only)
	- Get domain's auth code (EPP)

NOTE: All gTLDs must accept Terms of Service for Tucows Inc. to act as registrant's designated agent (DA). By accepting the
DA policy, contact updates to the "Owner" section can be automated by Odin and requires no additional steps by the
registrant.

Please review Tucows Inc. and OpenSRS revised TOS here: https://opensrs.com/wp-content/uploads/Tucows_ExhibitA.html

The following ccTLDs that require additional data are supported:
	- .PRO
	- .ASIA
	- .COM.AU
	- .NET.AU
	- .ORG.AU
	- .ASN.AU
	- .ID.AU
	- .BE
	- .FR
	- .CA
	- .SE
	- .NU
	- .US
	- .IT

Please see review the TLD reference chart for more details.

=================================================
Installation
=================================================

There are two options to install Registrar plugins for Odin:

1. Extract the folder "OpenSRS" from the .zip file to your server and place it within /var/www/pa-domain-sdk/

2. Upload the plugin through the Odin control panel.
Go to "Services > Domain Registrars > Add New Registrar > Upload New Plug-In"

=================================================
Configuration
=================================================

Domain Registrar: <Should be set to OpenSRS>
Username: <Your OpenSRS Reseller ID (Username)>
LIVE API Key: <Your OpenSRS Live API Key>
TEST API Key: <Your OpenSRS Test API Key>
Tech Contact: <Option to use your company tech contact address (Setup in OpenSRS reseller account at Domains > Settings)>
ICANN TOS Link: <HTTP Link to your Terms of Service for Tucows Inc. to act as registrant's designated agent. (Required)>
HRS Customer: <Option to enable HRS mode>
HRS API Server IP: <HRS customer's API server IP>
Test Mode: <If enabled, will send all API commends to Horizon (Test System>
Debug Mode: <Output additional data in log file /var/log/httpd/pa-domain.log>
Test Connection: <Tests your username/API key with a simple domain availability check>

IMPORTANT: 
Login to your OpenSRS account at manage.opensrs.com. Go to Domains > Settings and setup your default behaviour for new
registrations and transfers.

Default behaviours include:
	- Enable/Disable Auto-Renewal (Should be disabled for Odin, as Odin handles auto-renewals)
	- Enable/Disable WHOIS Privacy
	- Transfer Auto-renewals
	- Process orders immediately (Should be enabled)
	
=================================================
Reporting Bugs
=================================================

If you like to report bugs or need technicial assistance with the module itself, please provide the plugin log file
located at /var/log/httpd/pa-domain-sdk.log and email OpenSRS support at help@opensrs.com

=================================================
Change Log
=================================================

Release 1.3.1
- Fixed missing expiry date on transferred domains

Files Changed:
- /OpenSRS/class.OpenSRS.php

Release 1.3
- Fixed .AU TLD bug when transferring in a domain name
Domains with .AU extension will now transfer in with a period of zero

Files Changed:
- /OpenSRS/class.OpenSRS.php

Release 1.2
- Implemented new ICANN trade policy for owner contact changes
- All gTLD now show designated agent terms of service as requirement
- ICANN compliant logging for all Designated agent state changes

Files Changed:
- /OpenSRS/class.ExtFields.php
- /OpenSRS/class.OpenSRS.php
- /OpenSRS/src/opensrs/domains/icanntrade/enbleDATrade.php
- /OpenSRS/src/opensrs/domains/icanntrade/getTradeDAStatus.php
- /OpenSRS/src/opensrs/domains/icanntrade/modifyTradeDAStatus.php
- /OpenSRS/src/opensrs/domains/icanntrade/modifyTradeLock.php

Release 1.1
- Fixed security issue with PHP v5.5 and older
- Fixed i18n definitions for additional data fields
- Fixed security issue with base OpenSRS lib

Files Changed:
- /OpenSRS/src/opensrs/openSRS_base.php
- /OpenSRS/src/opensrs/openSRS_ops.php
- /OpenSRS/class.ExtFields.php

Release 1.0
- Plugin released