From 66c0c8e0e6197abd8a0bed0937675e71af1d3551 Mon Sep 17 00:00:00 2001 From: Kumi Date: Sun, 19 May 2024 18:31:45 +0200 Subject: [PATCH] refactor: adapt module for ISNIC EPP compatibility Renamed and refactored the module files and classes from a generic EPP implementation to specifically support ISNIC's EPP server requirements. Adjusted the README to reflect this transition, focusing on setting up the module for ISNIC rather than a broad range of registrars. This change enables the module to work seamlessly with ISNIC's EPP server, ensuring users can register and synchronize .is TLDs effectively within the FOSSBilling system. The update includes renaming epp.php to ISNIC.php, eppSync.php to ISNICSync.php, and refocusing the documentation on ISNIC-specific setup and configuration. This modification was crucial for users aiming to integrate FOSSBilling with ISNIC, streamlining the process and reducing setup complexities. --- epp.php => ISNIC.php | 2 +- eppSync.php => ISNICSync.php | 2 +- README.md | 50 ++++++------------------------------ 3 files changed, 10 insertions(+), 44 deletions(-) rename epp.php => ISNIC.php (99%) rename eppSync.php => ISNICSync.php (99%) diff --git a/epp.php b/ISNIC.php similarity index 99% rename from epp.php rename to ISNIC.php index 169db39..f78ab8b 100644 --- a/epp.php +++ b/ISNIC.php @@ -8,7 +8,7 @@ * * @license MIT */ -class Registrar_Adapter_EPP extends Registrar_AdapterAbstract +class Registrar_Adapter_ISNIC extends Registrar_AdapterAbstract { public $config = array(); public $socket; diff --git a/eppSync.php b/ISNICSync.php similarity index 99% rename from eppSync.php rename to ISNICSync.php index 2f6e4f0..24c65b7 100644 --- a/eppSync.php +++ b/ISNICSync.php @@ -5,7 +5,7 @@ use Pinga\Tembo\eppClient; $config = include "config.php"; $c = $config["db"]; -$registrar = "Epp"; +$registrar = "ISNIC"; try { diff --git a/README.md b/README.md index 586be78..16d96d8 100644 --- a/README.md +++ b/README.md @@ -1,34 +1,8 @@ -# Compatibility +# ISNIC EPP Module for FOSSBilling -This module is designed for use with: +This is a fork of the [fossbilling-epp-rfc](https://github.com/getpinga/fossbilling-epp-rfc) module that has been modified to work with ISNIC's EPP server. -- Any Generic RFC EPP registry. - -- Caucasus Online - .ge - -- CentralNic - all - -- CoCCA - all - -- CORE/Knipp - all - -- GoDaddy Registry - all - -- Google Nomulus - all - -- HKIRC - .hk - -- Identity Digital - all - -- RoTLD - .ro - -- RyCE - all - -- SIDN - all - -- ZADNA - .za - -- ZDNS - .all +The following instructions are from the original README.md file. # FOSSBilling Module Installation instructions @@ -38,27 +12,19 @@ Start by downloading the latest version of FOSSBilling from the official website ## 2. Installation and Configuration of Registrar Adapter: -First, download this repository which contains the epp.php file. After successfully downloading the repository, move the epp.php file into the `[FOSSBilling]/library/Registrar/Adapter` directory. - -Next, rename `epp.php` as `YourRegistryName.php`. Please ensure to replace "**YourRegistryName**" with the actual name of your registry. - -Proceed to open the newly renamed file and locate the phrase "**Registrar_Adapter_EPP**". Replace it with "**Registrar_Adapter_YourRegistryName**". +First, download this repository which contains the epp.php file. After successfully downloading the repository, move the ISNIC.php file into the `[FOSSBilling]/library/Registrar/Adapter` directory. ## 3. Addition of Synchronization Scripts: -There are two additional scripts in the repository: **eppSync.php** and **eppClient.php**. These need to be placed in the main `[FOSSBilling]` directory. - -Rename `eppSync.php` to `YourRegistryNameSync.php`. - -Edit `eppSync.php` and replace **Epp** in the line `$registrar = "Epp";` with the name of your registry provided in step 2. +There are two additional scripts in the repository: **ISNICSync.php** and **eppClient.php**. These need to be placed in the main `[FOSSBilling]` directory. ## 4. Setting Up the Cron Job: You need to set up a cron job that runs the sync module twice a day. Open crontab using the command `crontab -e` in your terminal. -Add the following cron job: +Add the following cron job (make sure to replace `/var/www/html/ISNICSync.php` with the correct path to the ISNICSync.php file): -`0 0,12 * * * php /var/www/html/YourRegistryNameSync.php` +`0 0,12 * * * php /var/www/html/ISNICSync.php` This command schedules the synchronization script to run once every 12 hours (at midnight and noon). @@ -72,4 +38,4 @@ Next, head to the "**Registrars**" tab. Here, you'll need to enter your specific ## 7. Adding a New TLD: -Finally, add a new Top Level Domain (TLD) using your module from the "**New Top Level Domain**" tab. Make sure to configure all necessary details, such as pricing, within this tab. +Finally, add the .is Top Level Domain (TLD) using at the "**New Top Level Domain**" tab. Make sure to configure all necessary details, such as pricing, within this tab.