Removed bb-modules/Serviceyouhosting/ Updated composer.lock

This commit is contained in:
Mr. Timothy Glenn Webb Sr committed 2020-10-04 19:11:27 +00:00
1 parent 3b4cad8af9
commit 053bd39709
20 files changed
+179 -2247

No files matched your search

@@ -1,163 +0,0 @@
<?php
/**
* BoxBilling
*
* @copyright BoxBilling, Inc (http://www.boxbilling.com)
* @license Apache-2.0
*
* Copyright BoxBilling, Inc
* This source file is subject to the Apache-2.0 License that is bundled
* with this source code in the file LICENSE
*/
/**
* Youhosting service management
*/
namespace Box\Mod\Serviceyouhosting\Api;
class Admin extends \Api_Abstract
{
/**
* Synchronize order with YouHosting account details
*
* @param int $order_id - Order id
*
* @return boolean
*
* @throws \Exception
*/
public function sync($data)
{
if (!isset($data['order_id'])) {
throw new \Exception('order_id is missing');
}
$this->getService()->sync($data['order_id']);
$this->di['logger']->info('Synchronized YouHosting account with order %s', $data['order_id']);
return true;
}
/**
* Return plans
*
* @return array
*/
public function get_plans($data)
{
$plans = $this->getService()->getApi()->call('Settings.plans');
$result = array();
foreach ($plans as $plan) {
$result[$plan['id']] = $plan['name'];
}
return $result;
}
/**
* Get login to cpanel url
*/
public function cpanel_url($data)
{
$order = $this->di['db']->getExistingModelById('ClientOrder', $data['order_id'], 'Order not found');
$order = $this->di['mod_service']('order')->toApiArray($order);
$params = array(
'id' => $order['meta']['yh_account_id'],
);
return $this->getService()->getApi()->call('Account.getLoginUrl', $params);
}
/**
* Import YouHosting accounts as BoxBilling orders
*
* Import clients before calling this action
*/
public function import_accounts($data)
{
if (!isset($data['page'])) {
throw new \Exception('Page parameter is missing');
}
$log = array();
$service = $this->getService();
$lastPage = $service->getLastClientAccountImportPage();
$page = ($lastPage > $data['page']) ? $lastPage : $data['page'];
$periods = array('none' => null, 'monthly' => '1M', 'quarterly' => '3M', 'biannually' => '6M', 'annually' => '1Y', 'biennially' => '2Y', 'triennially' => '3Y');
$items = $service->getApi()->call('Account.getList', array('page' => $page, 'per_page' => 50, 'status' => 'active'));
$pages = $items['pages'];
//do import
foreach ($items['list'] as $account) {
if ($service->isYHAccountImported($account['id'])) {
$log[] = 'Skipped already imported account #' . $account['id'];
continue;
}
try {
$id = $service->importYouhostingAccount($account);
$log[] = 'Imported order #' . $id . ' Youhosting account ' . $account['domain'];
} catch (\Exception $e) {
$log[] = $e->getMessage();
}
}
$service->setLastClientAccountImportPage($page);
return array(
'log' => implode(PHP_EOL, $log),
'current' => $page,
'next' => $page + 1,
'total' => $pages,
'continue' => ($page <= $pages),
);
}
/**
* Import clients from YouHosting to BoxBilling
*
* @return array - log message
*
* @throws \Exception
*/
public function import_clients($data)
{
if (!isset($data['page'])) {
throw new \Exception('Page parameter is missing');
}
$log = array();
$service = $this->getService();
$lastPage = $service->getLastClientImportPage();
$page = ($lastPage > $data['page']) ? $lastPage : $data['page'];
$clients = $this->getService()->getApi()->call('Client.getList', array('page' => $page, 'per_page' => 100));
$pages = $clients['pages'];
foreach ($clients['list'] as $client) {
try {
$service->importYouhostingClient($client);
$log[] = 'Imported client ' . $client['email'];
} catch (\Exception $e) {
$log[] = $e->getMessage();
}
}
$service->setLastClientImportPage($page);
return array(
'log' => implode(PHP_EOL, $log),
'current' => $page,
'next' => $page + 1,
'total' => $pages,
'continue' => ($page <= $pages),
);
}
}
@@ -1,187 +0,0 @@
<?php
/**
* BoxBilling
*
* @copyright BoxBilling, Inc (http://www.boxbilling.com)
* @license Apache-2.0
*
* Copyright BoxBilling, Inc
* This source file is subject to the Apache-2.0 License that is bundled
* with this source code in the file LICENSE
*/
/**
* Youhosting service management
*/
namespace Box\Mod\Serviceyouhosting\Api;
class Client extends \Api_Abstract
{
public function is_yh_client()
{
$id = $this->getService()->getYouhostingClientId($this->getIdentity()->id);
return (bool)$id;
}
/**
* Get order info
*
* @return bool
*
* @throws \Exception
*/
public function info($data)
{
if (!isset($data['order_id'])) {
throw new \Exception('order_id is missing');
}
$id = $this->getService()->getYouhostingClientId($this->getIdentity()->id);
$result = array(
'is_youhosting_client' => (bool)$id,
);
$order = $this->di['db']->getExistingModelById('ClientOrder', $data['order_id'], 'Order not found');
$order = $this->di['mod_service']('order')->toApiArray($order);
if (isset($order['meta']['yh_account_id']) && $order['meta']['yh_account_id']) {
$info = $this->getService()->getApi()->call('Account.get', array('id' => $order['meta']['yh_account_id']));
$result['account'] = $info;
$result['ns'] = $this->getService()->getApi()->call('Settings.nameservers');
}
return $result;
}
/**
* Get captcha information
*
* @return mixed
*/
public function captcha()
{
return $this->getService()->getApi()->call('Captcha.generate');
}
/**
* Signup as youhosting client
*
* @param $data
* @return bool
* @throws \Exception
*/
public function signup($data)
{
if (!isset($data['captcha_id'])) {
throw new \Exception('Captcha id is missing');
}
if (!isset($data['captcha_solution'])) {
throw new \Exception('captcha_solution is missing');
}
$cp = array(
'id' => $data['captcha_id'],
'solution' => $data['captcha_solution'],
);
$this->getService()->getApi()->call('Captcha.verify', $cp);
$client = $this->getIdentity();
$params = array(
'first_name' => $client->first_name,
'last_name' => $client->last_name,
'email' => $client->email,
'password' => $this->di['tools']->generatePassword(),
'captcha_id' => $data['captcha_id'],
);
$id = null;
try {
$result = $this->getService()->getApi()->call('Client.create', $params);
$id = $result['id'];
} catch (\Exception $e) {
if ($e->getCode() == 5108) {
$yh_clients = $this->getService()->getApi()->call('Client.getList', array('email' => $client->email));
if ($yh_clients['total']) {
$id = $yh_clients['list'][0]['id'];
} else {
error_log($e);
}
} else {
throw $e;
}
}
$this->getService()->storeYouhostingClientId($this->getIdentity()->id, $id);
return true;
}
/**
* Get cpanel login url
*
* @param $data
* @return mixed
* @throws \Exception
*/
public function cpanel_url($data)
{
if (!isset($data['order_id'])) {
throw new \Exception('order_id is missing');
}
$order = $this->di['db']->getExistingModelById('ClientOrder', $data['order_id'], 'Order not found');
$order = $this->di['mod_service']('order')->toApiArray($order);
$params = array(
'id' => $order['meta']['yh_account_id'],
);
return $this->getService()->getApi()->call('Account.getLoginUrl', $params);
}
/**
* Activate order
*
* @param int $captcha_id - captcha id
* @param int $order_id - order id
* @param string $captcha_solution - captcha solution
*
* @return bool
* @throws \Exception
*/
public function activate($data)
{
if (!isset($data['captcha_id'])) {
throw new \Exception('Captcha id is missing');
}
if (!isset($data['order_id'])) {
throw new \Exception('order_id is missing');
}
if (!isset($data['captcha_solution'])) {
throw new \Exception('captcha_solution is missing');
}
$cp = array(
'id' => $data['captcha_id'],
'solution' => $data['captcha_solution'],
);
$this->getService()->getApi()->call('Captcha.verify', $cp);
$order = $this->di['db']->getExistingModelById('ClientOrder', $data['order_id'], 'Order not found');
$orderService = $this->di['mod_service']('order');
$orderService->updateOrder($order, array('meta' => array('order_captcha_id' => $data['captcha_id'])));
$orderService->activateOrder($order);
return true;
}
}
@@ -1,128 +0,0 @@
<?php
/**
* BoxBilling
*
* @copyright BoxBilling, Inc (http://www.boxbilling.com)
* @license Apache-2.0
*
* Copyright BoxBilling, Inc
* This source file is subject to the Apache-2.0 License that is bundled
* with this source code in the file LICENSE
*/
/**
* Youhosting service management
*/
namespace Box\Mod\Serviceyouhosting\Api;
class Guest extends \Api_Abstract
{
/**
* Youhosting webhooks listener
*
* @return bool
*
* @throws \Exception
*/
public function webhook($data)
{
$this->di['logger']->info('YouHosting WebHook: ' . print_r($data, 1));
$config = $this->di['mod_config']('serviceyouhosting');
if (isset($config['yh_ips'])) {
$allowed_ips = explode(PHP_EOL, $config['yh_ips']);
array_walk($allowed_ips, function(&$val){
$val = trim($val);
});
} else {
$allowed_ips = array(
'212.1.209.2',
);
}
if (!in_array($this->di['request']->getClientAddress(), $allowed_ips)) {
throw new \Exception('IP not allowed');
}
if (!isset($data['yh_event'])) {
throw new \Exception('Event name is missing');
}
$account_id = $this->di['array_get']($data, 'yh_account_id', null);
$client_id = $this->di['array_get']($data, 'yh_client_id', null);
$service = $this->getService();
$orderService = $this->di['mod_service']('order');
switch ($data['yh_event']) {
case 'CREATE_ACCOUNT':
$bb_order_id = $service->isYHAccountImported($account_id);
if (!$bb_order_id) {
$account = $service->getApi()->call('Account.get', array('id' => $account_id));
$service->importYouhostingAccount($account);
$this->di['logger']->info('Imported YouHosting account. Invoked by WebHook');
}
break;
case 'SUSPEND_ACCOUNT':
$bb_order_id = $service->isYHAccountImported($account_id);
$order = $this->di['db']->getExistingModelById('ClientOrder', $data['order_id'], 'Order not found');
if ($order->status == 'active') {
$orderService->suspendFromOrder($order, 'Auto-Suspend');
$this->di['logger']->info('Suspended YouHosting account. Invoked by WebHook');
}
break;
case 'UNSUSPEND_ACCOUNT':
$bb_order_id = $service->isYHAccountImported($account_id);
$order = $this->di['db']->getExistingModelById('ClientOrder', $data['order_id'], 'Order not found');
if ($order->status == 'suspended') {
$orderService->unsuspendFromOrder($order);
$this->di['logger']->info('Unsuspended YouHosting account. Invoked by WebHook');
}
break;
case 'REMOVE_ACCOUNT':
$bb_order_id = $service->isYHAccountImported($account_id);
$order = $this->di['db']->getExistingModelById('ClientOrder', $data['order_id'], 'Order not found');
if ($order->status == 'active') {
$orderService->cancelFromOrder($order, 'Auto-Suspend');
$this->di['logger']->info('Canceled YouHosting account. Invoked by WebHook');
}
break;
default:
break;
}
return true;
}
/**
* Return master_domains
*
* @return array
*/
public function master_domains($data)
{
$key = 'settings_subdomains';
$cache = $this->di['cache'];
if ($cache->exists($key)) {
return $cache->get($key);
}
try {
$result = $this->getService()->getApi()->call('Settings.subdomains');
$cache->set($key, $result);
} catch (\Exception $e) {
error_log($e->getMessage());
$result = array();
}
return $result;
}
}
@@ -1,530 +0,0 @@
<?php
/**
* BoxBilling
*
* @copyright BoxBilling, Inc (http://www.boxbilling.com)
* @license Apache-2.0
*
* Copyright BoxBilling, Inc
* This source file is subject to the Apache-2.0 License that is bundled
* with this source code in the file LICENSE
*/
namespace Box\Mod\Serviceyouhosting;
class Service implements \Box\InjectionAwareInterface
{
protected $di;
/**
* @param mixed $di
*/
public function setDi($di)
{
$this->di = $di;
}
/**
* @return mixed
*/
public function getDi()
{
return $this->di;
}
public $mod = null;
public function __construct()
{
$this->mod = new \Box_Mod('serviceyouhosting');
}
public function getCartProductTitle($product, array $data)
{
if ($data['domain_type'] == 'subdomain') {
if (!isset($data['subdomain']) || empty($data['subdomain'])) {
throw new \Box_Exception('Please enter subdomain', null, 7102);
}
if (!isset($data['master_domain']) || empty($data['master_domain'])) {
throw new \Box_Exception('Please select master domain', null, 7103);
}
$domain = $data['subdomain'] . '.' . $data['master_domain'];
}
if ($data['domain_type'] == 'domain') {
if (!isset($data['domain'])) {
throw new \Box_Exception('Please enter domain value', null, 7104);
}
$domain = $data['domain'];
}
return __(':product for :domain', array(':domain' => $domain, ':product' => $product['title']));
}
public function validateOrderData(array &$data)
{
if (!isset($data['domain_type']) || empty($data['domain_type'])) {
throw new \Box_Exception('Unknown domain type.', null, 7101);
}
if ($data['domain_type'] == 'subdomain') {
if (!isset($data['subdomain']) || empty($data['subdomain'])) {
throw new \Box_Exception('Please enter subdomain', null, 7102);
}
if (!isset($data['master_domain']) || empty($data['master_domain'])) {
throw new \Box_Exception('Please select master domain', null, 7103);
}
$data['master_domain'] = strtolower($data['master_domain']);
$data['subdomain'] = strtolower($data['subdomain']);
$domain = $data['master_domain'];
$full_domain = $data['subdomain'] . '.' . $data['master_domain'];
}
if ($data['domain_type'] == 'domain') {
if (!isset($data['domain']) || empty($data['domain'])) {
throw new \Box_Exception('Please enter domain value', null, 7104);
}
$domain = strtolower($data['domain']);
$full_domain = $domain;
}
if (!isset($data['skip_domain_check'])) {
$check_data = array(
'type' => $data['domain_type'],
'domain' => $domain,
'subdomain' => $this->di['array_get']($data, 'subdomain', null),
);
$this->getApi()->call('Account.check', $check_data);
}
$data['full_domain'] = $full_domain;
}
public function activate($order)
{
$order = $this->di['db']->getExistingModelById('ClientOrder', $order->id, 'Order not found');
$orderService = $this->di['mod_service']('order');
$o = $orderService->toApiArray($order);
$yh_client_id = $this->getYouhostingClientId($o['client_id']);
if (!$yh_client_id) {
throw new \Exception('Client must confirm his account before activating order');
}
if (!isset($o['meta']['order_captcha_id'])) {
throw new \Exception('Captcha must be solved by client before activating YouHosting account');
}
$product = $this->di['db']->getExistingModelById('Product', $order->product_id, 'Product not found');
$productService = $this->di['mod_service']('product');
$product = $productService->toApiArray($product);
$password = $this->di['tools']->generatePassword();
$params = array(
'client_id' => $yh_client_id,
'captcha_id' => $o['meta']['order_captcha_id'],
'plan_id' => $product['config']['plan_id'],
'type' => $o['config']['domain_type'],
'domain' => ($o['config']['domain_type'] == 'subdomain') ? $o['config']['master_domain'] : $o['config']['domain'],
'subdomain' => isset($o['config']['subdomain']) ? $o['config']['subdomain'] : null,
'password' => $password,
);
$account = $this->getApi()->call('Account.create', $params);
$orderService = $this->di['mod_service']('order');
$orderService->updateOrder($o, array('id' => $order->id, 'meta' => array('yh_account_id' => $account['id'], 'password' => $password)));
return array(
'account' => $account,
'ns' => $this->getApi()->call('Settings.nameservers'),
);
}
/**
* Suspend service
*
* @param $order
* @return boolean
*/
public function suspend($order)
{
$order = $this->di['db']->getExistingModelById('ClientOrder', $order->id, 'Order not found');
$orderService = $this->di['mod_service']('order');
$orderArr = $orderService->toApiArray($order);
$params = array('id' => $orderArr['meta']['yh_account_id']);
try {
$this->getApi()->call('Account.suspend', $params);
} catch (\Exception $e) {
//6401 = Account not found
if ($e->getCode() == 6401) {
return true;
}
throw $e;
}
return true;
}
/**
* @param $order
* @return boolean
*/
public function unsuspend($order)
{
$order = $this->di['db']->getExistingModelById('ClientOrder', $order['id'], 'Order not found');
$orderService = $this->di['mod_service']('order');
$orderArr = $orderService->toApiArray($order);
$params = array('id' => $orderArr['meta']['yh_account_id']);
$this->getApi()->call('Account.unsuspend', $params);
return true;
}
/**
* @param $order
* @return boolean
*/
public function cancel($order)
{
return $this->suspend($order);
}
/**
*
* @param $order
* @return boolean
*/
public function uncancel($order)
{
return $this->unsuspend($order);
}
/**
* @param $order
* @return boolean
*/
public function delete($order)
{
try {
$o = $this->di['db']->getExistingModelById('ClientOrder', $order['id'], 'Order not found');
$params = array('id' => $o['meta']['yh_account_id']);
$this->getApi()->call('Account.delete', $params);
} catch (\Exception $e) {
error_log($e);
}
return true;
}
public function sync($order_id)
{
$order = $this->di['db']->getExistingModelById('ClientOrder', $order_id, 'Order not found');
$orderArr = $this->di['mod_service']('order')->toApiArray($order);
$account = $this->getApi()->call('Account.get', array('id' => $orderArr['meta']['yh_account_id']));
$orderService = $this->di['mod_service']('order');
$orderService->updateOrder($order, array(
'id' => $order_id,
'status' => $account['status'],
'created_at' => $account['created_at']
));
}
public function getLastClientAccountImportPage($default = 1)
{
$value = $this->di['db']->getCell("
SELECT meta_value
FROM extension_meta
WHERE
extension = 'mod_serviceyouhosting'
AND meta_key = 'last_account_page'
");
if ($value) {
return $value;
}
return $default;
}
public function setLastClientAccountImportPage($page)
{
$meta = $this->di['db']->findOne('extension_meta', "
extension = 'mod_serviceyouhosting'
AND meta_key = 'last_account_page'
");
if (!$meta) {
$meta = $this->di['db']->dispense('extension_meta');
$meta->extension = 'mod_serviceyouhosting';
$meta->meta_key = 'last_account_page';
$meta->created_at = date('Y-m-d H:i:s');
}
$meta->meta_value = $page;
$meta->updated_at = date('Y-m-d H:i:s');
$this->di['db']->store($meta);
}
public function getLastClientImportPage($default = 1)
{
$value = $this->di['db']->getCell("
SELECT meta_value
FROM extension_meta
WHERE
extension = 'mod_serviceyouhosting'
AND meta_key = 'last_client_page'
");
if ($value) {
return $value;
}
return $default;
}
public function setLastClientImportPage($page)
{
$meta = $this->di['db']->findOne('extension_meta', "
extension = 'mod_serviceyouhosting'
AND meta_key = 'last_client_page'
");
if (!$meta) {
$meta = $this->di['db']->dispense('extension_meta');
$meta->extension = 'mod_serviceyouhosting';
$meta->meta_key = 'last_client_page';
$meta->created_at = date('Y-m-d H:i:s');
}
$meta->meta_value = $page;
$meta->updated_at = date('Y-m-d H:i:s');
$this->di['db']->store($meta);
}
public function storeYouhostingClientId($client_id, $yh_client_id)
{
//remove all null values if present
$this->di['db']->exec("
DELETE FROM extension_meta
WHERE extension = 'mod_serviceyouhosting'
AND meta_key = 'yh_client_id'
AND client_id = :client_id",
array('client_id'=>$client_id)
);
$meta = $this->di['db']->dispense('extension_meta');
$meta->extension = 'mod_serviceyouhosting';
$meta->client_id = $client_id;
$meta->meta_key = 'yh_client_id';
$meta->meta_value = $yh_client_id;
$meta->created_at = date('Y-m-d H:i:s');
$meta->updated_at = date('Y-m-d H:i:s');
$this->di['db']->store($meta);
}
public function isYHAccountImported($yh_account_id)
{
$id = $this->di['db']->getCell("
SELECT client_order_id
FROM client_order_meta
WHERE name = 'yh_account_id'
AND value = :yh_account_id
", array('yh_account_id' => $yh_account_id));
if ($id) {
return $id;
}
return null;
}
public function isYHClientBBClient($yh_client_id)
{
$id = $this->di['db']->getCell("
SELECT client_id
FROM extension_meta
WHERE
extension = 'mod_serviceyouhosting'
AND meta_key = 'yh_client_id'
AND meta_value = :yh_client_id",
array('yh_client_id'=>$yh_client_id));
if ($id) {
return $id;
}
return null;
}
public function getYouhostingClientId($client_id)
{
$id = $this->di['db']->getCell("
SELECT meta_value
FROM extension_meta
WHERE
extension = 'mod_serviceyouhosting'
AND meta_key = 'yh_client_id'
AND client_id = :id",
array('id'=>$client_id));
if ($id) {
return $id;
}
return null;
}
public function getOrCreateProductForHostingPlan($plan_id)
{
$id = $this->di['db']->getCell("
SELECT id
FROM `product`
WHERE type = 'youhosting'
AND `config` LIKE :config
LIMIT 1",
array('config' => '%' . $plan_id . '%')
);
if ($id) {
return $id;
}
$title = 'Youhosting ' . $plan_id;
$type = 'youhosting';
$productService = $this->di['mod_service']('product');
$id = $productService->createProduct($title, $type);
$product = $this->di['db']->getExistingModelById('Product', $id, 'Product not found');
$productService->updateProduct($product, array(
'config' => array('plan_id' => $plan_id,)
));
return $id;
}
public function importYouhostingClient($yh_client_data)
{
if ($this->isYHClientBBClient($yh_client_data['id'])) {
throw new \Exception('Skipping already imported client #' . $yh_client_data['id']);
}
$cdata = array(
'aid' => $yh_client_data['id'],
'email' => $yh_client_data['email'],
'first_name' => $yh_client_data['first_name'],
'last_name' => $yh_client_data['last_name'],
'company' => $yh_client_data['company'],
'address_1' => $yh_client_data['address_1'],
'address_2' => $yh_client_data['address_2'],
'city' => $yh_client_data['city'],
'country' => $yh_client_data['country'],
'state' => $yh_client_data['state'],
'postcode' => $yh_client_data['zip'],
'phone' => $yh_client_data['phone'],
'phone_cc' => $yh_client_data['phone_cc'],
'created_at' => $yh_client_data['created_at'],
);
$clientService = $this->di['mod_service']('client');
$validator = $this->di['validator'];
$validator->isEmailValid($yh_client_data['email']);
if ($clientService->emailAreadyRegistered($yh_client_data['email'])) {
throw new \Box_Exception('Email is already registered.');
}
$cid = $clientService->adminCreateClient($cdata);
$this->storeYouhostingClientId($cid, $yh_client_data['id']);
return $cid;
}
public function importYouhostingAccount($account)
{
if ($this->isYHAccountImported($account['id'])) {
return false;
}
$client_id = $this->isYHClientBBClient($account['client_id']);
if (!$client_id) {
$yhc = $this->getApi()->call('Client.getList', array('page' => 1, 'per_page' => 1, 'id' => $account['client_id']));
if ($yhc['total'] == 1) {
$c = $yhc['list'][0];
try {
$client_id = $this->importYouhostingClient($c);
} catch (\Exception $e) {
error_log($e->getMessage());
}
}
}
$product_id = $this->getOrCreateProductForHostingPlan($account['plan_id']);
$period = $this->di['array_get']($periods, $account['period']);
$odata = array(
'client_id' => $client_id,
'product_id' => $product_id,
'title' => $account['domain'],
'period' => $period,
'activate' => false,
'invoice_option' => 'no-invoice',
'created_at' => $account['created_at'],
'meta' => array(
'yh_account_id' => $account['id'],
),
'config' => array(
'skip_domain_check' => true,
'domain_type' => 'domain',
'domain' => $account['domain'],
),
);
$client = $this->di['db']->getExistingModelById('Client', $odata['client_id'], 'Client not found');
$product = $this->di['db']->getExistingModelById('Product', $odata['product_id'], 'Product not found');
$orderService = $this->di['mod_service']('order');
$id = $orderService->createOrder($client, $product, $odata);
$order = $this->di['db']->getExistingModelById('ClientOrder', $id, 'Order not found');
$orderService->updateOrder($order, array('status' => 'active'));
return $id;
}
public function getApi()
{
if (!$this->di['license']->isPro()) {
throw new \Exception('YouHosting module can only be used by PRO license owners. Get PRO license key at http://www.boxbilling.com/order', 509);
}
$config = $this->di['mod_config']('serviceyouhosting');
require_once 'Youhosting.php';
$a = array(
'api_key' => $config['api_key'],
'boxbilling' => array('license' => $this->di['config']['license']),
);
return new Youhosting_Api($a);
}
}
@@ -1,307 +0,0 @@
<?php
/**
* BoxBilling
*
* @copyright BoxBilling, Inc (http://www.boxbilling.com)
* @license Apache-2.0
*
* Copyright BoxBilling, Inc
* This source file is subject to the Apache-2.0 License that is bundled
* with this source code in the file LICENSE
*/
namespace Box\Mod\Serviceyouhosting;
class Youhosting_Api
{
private $config;
public function __construct($config)
{
$this->config = $config;
}
public function call($resource, $params = array())
{
list($class, $method) = explode('.', $resource);
$version = isset($this->config['version']) ? $this->config['version'] : 'V1';
$r = '\Box\Mod\Serviceyouhosting\Youhosting_Api_' . $version . '_' . $class;
$reflection = new \ReflectionClass($r);
if (!$reflection->hasMethod($method)) {
throw new \Exception("Resource $resource is not valid. (Hint: Check resource method)", 101);
}
$m = $reflection->getMethod($method);
return $m->invoke(new $r($this->config), $params);
}
}
class Youhosting_Api_V1
{
const VERSION = '1.0.0';
private $config;
private $apiBase = 'https://rest.main-hosting.com/v1/';
public function __construct($config)
{
if (!isset($config['api_key'])) {
throw new \Exception('No API key provided');
}
$this->config = $config;
}
/**
* @param string $url
*/
protected function _post($url, array $params = array())
{
return $this->_request($url, $params, 'POST');
}
/**
* @param string $url
*/
protected function _get($url, array $params = array())
{
return $this->_request($url, $params, 'GET');
}
/**
* @param string $url
*/
protected function _delete($url, array $params = array())
{
return $this->_request($url, $params, 'DELETE');
}
private function _request($url, array $params = array(), $meth = 'POST')
{
$client = self::VERSION;
$absUrl = $this->apiBase . $url;
$params['client_ip'] = isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : $this->config['ip'];
$langVersion = phpversion();
$uname = php_uname();
$ua = array(
'bindings_version' => $client,
'lang' => 'php',
'lang_version' => $langVersion,
'publisher' => 'youhosting',
'uname' => $uname
);
$headers = array(
'X-Youhosting-Client-User-Agent: ' . json_encode($ua),
'User-Agent: YouHosting/PHP/' . $client,
'Authorization: Basic ' . base64_encode('reseller:' . $this->config['api_key']),
);
if (isset($this->config['boxbilling'])) {
$headers[] = 'X-BoxBilling: ' . json_encode($this->config['boxbilling']);
}
list($rbody, $rcode) = $this->_curlRequest($meth, $absUrl, $headers, $params);
$result = json_decode($rbody, true);
if ($result['error']) {
throw new \Exception($result['error']['message'], $result['error']['code']);
}
return $result['result'];
}
/**
* @param string $meth
* @param string $absUrl
* @param string[] $headers
*/
private function _curlRequest($meth, $absUrl, $headers, $params)
{
$curl = curl_init();
$meth = strtolower($meth);
$opts = array();
if ($meth == 'get') {
$opts[CURLOPT_HTTPGET] = 1;
if (count($params) > 0) {
$encoded = $this->_encode($params);
$absUrl = "$absUrl?$encoded";
}
} else if ($meth == 'post') {
$opts[CURLOPT_POST] = 1;
$opts[CURLOPT_POSTFIELDS] = $this->_encode($params);
} else if ($meth == 'delete') {
$opts[CURLOPT_CUSTOMREQUEST] = 'DELETE';
if (count($params) > 0) {
$encoded = $this->_encode($params);
$absUrl = "$absUrl?$encoded";
}
} else {
throw new \Exception("Unrecognized method $meth");
}
$absUrl = $this->_utf8($absUrl);
$opts[CURLOPT_URL] = $absUrl;
$opts[CURLOPT_RETURNTRANSFER] = true;
$opts[CURLOPT_CONNECTTIMEOUT] = 30;
$opts[CURLOPT_TIMEOUT] = 80;
$opts[CURLOPT_HTTPHEADER] = $headers;
$opts[CURLOPT_SSL_VERIFYPEER] = false;
curl_setopt_array($curl, $opts);
$rbody = curl_exec($curl);
$errno = curl_errno($curl);
if ($rbody === false) {
$errno = curl_errno($curl);
$message = curl_error($curl);
curl_close($curl);
$this->_handleCurlError($errno, $message);
}
$rcode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
curl_close($curl);
return array($rbody, $rcode);
}
/**
* @param integer $errno
* @param string $message
*/
private function _handleCurlError($errno, $message)
{
$supportEmail = 'support@youhosting.com';
$apiBase = $this->apiBase;
switch ($errno) {
case CURLE_COULDNT_CONNECT:
case CURLE_COULDNT_RESOLVE_HOST:
case CURLE_OPERATION_TIMEOUTED:
$msg = "Could not connect to Youhosting ($apiBase). Please check your internet connection and try again. If this problem persists, you should check YouHosting's service status at https://twitter.com/youhostingstatus, or let us know at $supportEmail.";
break;
case CURLE_SSL_CACERT:
case CURLE_SSL_PEER_CERTIFICATE:
$msg = "Could not verify Youhosting's SSL certificate. Please make sure that your network is not intercepting certificates. (Try going to $apiBase in your browser.) If this problem persists, let us know at $supportEmail.";
break;
default:
$msg = "Unexpected error communicating with Youhosting. If this problem persists, let us know at $supportEmail.";
}
$msg .= "\n\n(Network error [errno $errno]: $message)";
throw new \Exception($msg, (int)$errno);
}
private function _utf8($value)
{
if (is_string($value))
return utf8_encode($value);
else
return $value;
}
private function _encode($d)
{
return http_build_query($d, null, '&');
}
}
class Youhosting_Api_V1_Captcha extends Youhosting_Api_V1
{
public function generate()
{
return $this->_post('captcha');
}
public function verify($params)
{
return $this->_post('captcha/' . $params['id'], $params);
}
}
class Youhosting_Api_V1_Client extends Youhosting_Api_V1
{
public function create($params)
{
return $this->_post('client', $params);
}
public function get($params)
{
return $this->_get('client/' . $params['id'], $params);
}
public function getList($params)
{
return $this->_get('client/list', $params);
}
public function getLoginUrl($params)
{
return $this->_get('client/' . $params['id'] . '/login-url', $params);
}
}
class Youhosting_Api_V1_Account extends Youhosting_Api_V1
{
public function check($params)
{
return $this->_get('account/check', $params);
}
public function create($params)
{
return $this->_post('account', $params);
}
public function get($params)
{
return $this->_get('account/' . $params['id'], $params);
}
public function getList($params)
{
return $this->_get('account/list', $params);
}
public function suspend($params)
{
return $this->_post('account/' . $params['id'] . '/suspend', $params);
}
public function unsuspend($params)
{
return $this->_post('account/' . $params['id'] . '/unsuspend', $params);
}
public function delete($params)
{
return $this->_delete('account/' . $params['id'], $params);
}
public function getLoginUrl($params)
{
return $this->_get('account/' . $params['id'] . '/login-url', $params);
}
}
class Youhosting_Api_V1_Settings extends Youhosting_Api_V1
{
public function plans()
{
return $this->_get('settings/plans');
}
public function subdomains()
{
return $this->_get('settings/subdomains');
}
public function nameservers()
{
return $this->_get('settings/nameservers');
}
}
@@ -1,22 +0,0 @@
<div class="help">
<h5>{% trans 'YouHosting specifict settings' %}</h5>
</div>
<form method="post" action="{{ 'api/admin/product/update_config'|link }}" class="mainForm api-form save" data-api-msg="Configuration saved">
<fieldset>
<div class="rowElem noborder">
<label>{% trans 'Hosting plan' %}:</label>
<div class="formRight">
{{ mf.selectbox('config[plan_id]', admin.serviceyouhosting_get_plans, product.config.plan_id, 0, 'Select hosting plan') }}
</div>
<div class="fix"></div>
</div>
<input type="hidden" name="id" value="{{ product.id }}" />
<input type="submit" value="{% trans 'Update' %}" class="greyishBtn submitForm" />
</fieldset>
</form>
@@ -1,38 +0,0 @@
<div class="help">
<h2>{% trans 'Details' %}</h2>
</div>
<table class="tableStatic wide">
<tbody>
<tr class="noborder">
<td style="width: 30%">{% trans 'Domain' %}:</td>
<td>
<a href="http://{{ order.config.full_domain }}" target="_blank">{{ order.config.full_domain }}</a>
</td>
</tr>
<tr>
<td>{% trans 'Account Id' %}:</td>
<td>{{ order.meta.yh_account_id }}</td>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan="2">
<div class="aligncenter">
<a href="{{ 'api/admin/serviceyouhosting/cpanel_url'|link({'order_id' : order.id}) }}" data-api-jsonp="onAfterLoginUrlRetrieve" class="btn55 mr10 api-link"><img src="images/icons/middlenav/logoff.png" alt=""><span>Go to cPanel</span></a>
<a href="{{ 'api/admin/serviceyouhosting/sync'|link({'order_id' : order.id}) }}" data-api-msg="Synchronization completed" class="btn55 mr10 api-link"><img src="images/icons/middlenav/cog.png" alt=""><span>Sync</span></a>
</div>
</td>
</tr>
</tfoot>
</table>
<script type="text/javascript">
function onAfterLoginUrlRetrieve(url)
{
window.open(url, '_blank', 'width=400,height=200');
return false;
}
</script>
@@ -1,58 +0,0 @@
<div class="rowElem">
<label>{% trans 'Domain type' %}:</label>
<div class="formRight domain-action-select">
<input type="radio" name="config[domain_type]" value="domain" checked="checked"/><label>Domain</label>
<input type="radio" name="config[domain_type]" value="subdomain" /><label>Subdomain</label>
</div>
<div class="fix"></div>
</div>
<div class="rowElem domain-action subdomain" style="display: none;">
<label>{% trans 'Host subdomain' %}:</label>
<div class="formRight moreFields">
<ul>
<li><input type="text" name="config[subdomain]" value="{{ request.subdomain }}" placeholder="{% trans 'subdomain' %}"></li>
<li class="sep">.</li>
<li>
<select name="config[master_domain]">
{% for subdomain in guest.serviceyouhosting_master_domains %}
<option value="{{ subdomain }}">{{ subdomain }}</option>
{% endfor %}
</select>
</li>
</ul>
</div>
<div class="fix"></div>
</div>
<div class="rowElem domain-action domain">
<label>{% trans 'Host domain' %}:</label>
<div class="formRight">
<input type="text" name="config[domain]" value="{{ request.domain }}" placeholder="{% trans 'domain.com' %}" />
</div>
<div class="fix"></div>
</div>
<div class="rowElem">
<label>{% trans 'Information' %}:</label>
<div class="formRight">
Due to huge amount of spam accounts on YouHosting every new account must be approved (captcha solved) by <strong>{{ client.first_name }} {{ client.last_name }}</strong> before order can be activated.
</div>
<div class="fix"></div>
</div>
<script type="text/javascript">
$(function() {
$('.domain-action-select input').bind('click', function (){
$('.domain-action').hide();
if($(this).val() == 'domain') {
$('.domain-action.domain').show();
} else {
$('.domain-action.subdomain').show();
}
});
});
</script>
@@ -1,137 +0,0 @@
{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %}
{% import "macro_functions.phtml" as mf %}
{% block meta_title %}YouHosting{% endblock %}
{% set active_menu = 'system' %}
{% block breadcrumbs %}
<ul>
<li class="firstB"><a href="{{ '/'|alink }}">{% trans 'Home' %}</a></li>
<li><a href="{{ 'system'|alink }}">{% trans 'Settings' %}</a></li>
<li class="lastB">{% trans 'YouHosting settings' %}</li>
</ul>
{% endblock %}
{% block content %}
{% set params = admin.extension_config_get({"ext":"mod_serviceyouhosting"}) %}
<form method="post" action="{{ 'api/admin/extension/config_save'|link }}" class="mainForm api-form" data-api-msg="Settings updated">
<div class="widget simpleTabs">
<ul class="tabs">
<li><a href="#tab-index">{% trans 'YouHosting settings' %}</a></li>
<li><a href="#tab-advanced">{% trans 'Advanced' %}</a></li>
</ul>
<div class="tabs_container">
<div class="fix"></div>
<div id="tab-index" class="tab_content nopadding">
<fieldset>
<div class="rowElem noborder">
<label>{% trans 'Your IP' %}</label>
<div class="formRight">
<strong>{{ admin.system_env({'ip':1}) }}</strong>
</div>
<div class="fix"></div>
</div>
<div class="rowElem">
<label>{% trans 'WebHook URL' %}</label>
<div class="formRight">
<strong>{{ 'api/guest/serviceyouhosting/webhook' | link }}</strong>
</div>
<div class="fix"></div>
</div>
<div class="rowElem">
<label>{% trans 'Api Key' %}</label>
<div class="formRight">
<input type="text" name="api_key" value="{{params.api_key}}" placeholder="Get API Key at YouHosting.com control panel"/>
</div>
<div class="fix"></div>
</div>
<input type="submit" value="{% trans 'Update settings' %}" class="greyishBtn submitForm" />
<div class="body">
{#<a href="{{'product'|alink({'type' : 'youhosting', 'title' : 'YouHosting'})}}#tab-new" target="_blank" class="btnIconLeft mr10"><img src="images/icons/dark/play.png" alt="" class="icon"><span>{% trans 'Create YouHosting product' %}</span></a>#}
<input type="button" value="{% trans 'Check connection' %}" class="blueBtn" onclick="bb.post('admin/serviceyouhosting/get_plans', null, function(){ bb.msg('Successfully connected') }); return false;"/>
<input type="button" value="{% trans 'Import clients' %}" class="blueBtn" id="import-clients" data-bb-import-page="1"/>
<input type="button" value="{% trans 'Import clients, accounts and products' %}" class="blueBtn" id="import-accounts" data-bb-import-page="1"/>
</div>
</fieldset>
<div id="import-results"></div>
<pre id="import-results-log"></pre>
</div>
<div id="tab-advanced" class="tab_content nopadding">
<fieldset>
<div class="rowElem noborder">
<label class="topLabel">{% trans 'Allowed IPs for Webhook listener' %}</label>
<div class="formBottom">
<textarea name="yh_ips" value="{{params.yh_ips}}" placeholder="212.1.209.2"></textarea>
</div>
<div class="fix"></div>
</div>
<input type="submit" value="{% trans 'Update settings' %}" class="greyishBtn submitForm" />
</fieldset>
</div>
</div>
</div>
<input type="hidden" name="ext" value="mod_serviceyouhosting" />
</form>
{% endblock %}
{% block js %}
<script type="text/javascript">
$(function() {
$('#import-accounts').click(function(){
$.ajax({
type: "POST",
url: bb.restUrl('admin/serviceyouhosting/import_accounts'),
data: {page: $('#import-accounts').attr('data-bb-import-page')},
dataType: 'json',
error: function(jqXHR, textStatus, e) {
bb.msg(e, 'error');
},
success: function(data) {
if(data.result.continue) {
$('#import-results-log').text(data.result.log);
$('#import-results').text('Imported page ' + data.result.current + ' of ' + data.result.total);
$('#import-accounts').attr('data-bb-import-page', data.result.next);
$('#import-accounts').click();
}
}
});
return false;
});
$('#import-clients').click(function(){
$.ajax({
type: "POST",
url: bb.restUrl('admin/serviceyouhosting/import_clients'),
data: {page: $('#import-clients').attr('data-bb-import-page')},
dataType: 'json',
error: function(jqXHR, textStatus, e) {
bb.msg(e, 'error');
},
success: function(data) {
if(data.result.continue) {
$('#import-results-log').text(data.result.log);
$('#import-results').text('Imported page ' + data.result.current + ' of ' + data.result.total);
$('#import-clients').attr('data-bb-import-page', data.result.next);
$('#import-clients').click();
}
}
});
return false;
});
});
</script>
{% endblock %}
@@ -1,235 +0,0 @@
{% set yh = client.serviceyouhosting_info({'order_id':order.id}) %}
{% if order.status == 'pending_setup' %}
<div class="alert alert-info" xmlns="http://www.w3.org/1999/html">
<p>{% trans 'Order activation process will start after confirmation' %}</p>
</div>
{% endif %}
{% if not yh.is_youhosting_client %}
<div class="row">
<article class="span12 data-block">
<div class="data-container">
<header>
<h2 class="alert alert-danger">{% trans 'Solve captcha to activate order' %}</h2>
</header>
<section>
<form method="post" action="{{ 'api/client/serviceyouhosting/signup'|link }}" class="api-form" data-api-reload="1">
<fieldset>
{% set captcha = client.serviceyouhosting_captcha({"for_client":1}) %}
<div class="control-group">
<div class="controls">
<img src="{{ captcha.url }}" alt="Captcha">
</div>
</div>
<div class="control-group">
<div class="controls">
<input type="text" name="captcha_solution" value="" />
</div>
</div>
<div class="control-group">
<div class="controls">
<button type="submit" value="{% trans 'Activate' %}" class="submitForm btn btn-primary">{% trans 'Activate' %}</button>
</div>
</div>
<input type="hidden" name="captcha_id" value="{{ captcha.id }}" />
</fieldset>
</form>
</section>
</div>
</article>
</div>
{% endif %}
{% if order.status == 'failed_setup' %}
<div class="row">
<article class="span12 data-block">
<div class="data-container">
<header>
<h2 class="alert alert-danger">{% trans 'Order activation captcha' %}</h2>
</header>
<section>
<form method="post" action="{{ 'api/client/serviceyouhosting/activate'|link }}" class="api-form" data-api-reload="1">
<fieldset>
{% set captcha = client.serviceyouhosting_captcha %}
<div class="control-group">
<div class="controls">
<img src="{{ captcha.url }}" alt="Captcha">
</div>
</div>
<div class="control-group">
<div class="controls">
<input type="text" name="captcha_solution" value="" />
</div>
</div>
<div class="control-group">
<div class="controls">
<button type="submit" value="{% trans 'Activate' %}" class="submitForm btn btn-primary">{% trans 'Activate' %}</button>
</div>
</div>
<input type="hidden" name="captcha_id" value="{{ captcha.id }}" />
<input type="hidden" name="order_id" value="{{ order.id }}" />
</fieldset>
</form>
</section>
</div>
</article>
</div>
{% endif %}
{% if order.status == 'active' %}
{% set product = guest.product_get({"id":order.product_id}) %}
<div class="row">
<article class="span12 data-block">
<div class="data-container">
<header>
<h2>{% trans 'Hosting management' %}</h2>
<ul class="data-header-actions">
<li class="youhosting-tabs active"><a href="#tab-details" class="btn btn-inverse btn-alt">{% trans 'Details' %}</a></li>
<li class="youhosting-tabs"><a href="#tab-ftp" class="btn btn-inverse btn-alt">{% trans 'FTP Details' %}</a></li>
<li class="youhosting-tabs"><a href="#tab-nameservers" class="btn btn-inverse btn-alt">{% trans 'Nameservers' %}</a></li>
</ul>
</header>
<section class="tab-content">
<div class="tab-pane active" id="tab-details">
<table class="table table-striped table-bordered table-condensed">
<tbody>
<tr>
<td>{% trans 'Hostname' %}:</td>
<td>
<a target="_blank" href="http://{{ yh.account.domain }}">{{ yh.account.domain }}</a>
</td>
</tr>
<tr>
<td>{% trans 'Account status' %}:</td>
<td>
{{ yh.account.status | title }}
</td>
</tr>
<tr>
<td>{% trans 'Account ID' %}:</td>
<td>
{{ yh.account.id }}
</td>
</tr>
<tr>
<td>{% trans 'Username' %}:</td>
<td>
{{ yh.account.username }}
</td>
</tr>
<tr>
<td>{% trans 'IP' %}:</td>
<td>
{{ yh.account.ip }}
</td>
</tr>
</tbody>
</table>
<div class="control-group">
<div class="controls">
<a class="btn btn-primary" href="#" id="open-cpanel">{% trans 'Open Control Panel' %}</a>
</div>
</div>
</div>
<div class="tab-pane" id="tab-ftp">
<table class="table table-striped table-bordered table-condensed">
<tbody>
<tr>
<td>{% trans 'FTP IP' %}</td>
<td><a target="_blank" href="ftp://{{ yh.account.ip }}">{{ yh.account.ip }}</a></td>
</tr>
<tr>
<td>{% trans 'FTP Hostname' %}</td>
<td><a target="_blank" href="ftp://{{ yh.account.domain }}">{{ yh.account.domain }}</a></td>
</tr>
<tr>
<td>{% trans 'FTP Username' %}</td>
<td>{{ yh.account.username }}</td>
</tr>
<tr>
<td>{% trans 'FTP Password' %}</td>
<td>••••••••••</td>
</tr>
<tr>
<td>{% trans 'FTP Port' %}</td>
<td>21</td>
</tr>
<tr>
<td>{% trans 'Folder to Upload Files' %}</td>
<td>public_html</td>
</tr>
<tr>
<td>{% trans 'Recommended FTP Clients' %}</td>
<td><a target="_blank" href="http://www.smartftp.com/">{% trans 'SmartFTP' %}</a> {% trans 'or' %} <a target="_blank" href="http://filezilla-project.org/">{% trans 'FileZilla' %}</a>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tab-pane" id="tab-nameservers">
<table class="table table-striped table-bordered table-condensed">
<tbody>
<tr>
<td>{{ yh.ns.ns1 }}</td>
<td>{{ yh.ns.ip1 }}</td>
</tr>
<tr>
<td>{{ yh.ns.ns2 }}</td>
<td>{{ yh.ns.ip2 }}</td>
</tr>
<tr>
<td>{{ yh.ns.ns3 }}</td>
<td>{{ yh.ns.ip3 }}</td>
</tr>
<tr>
<td>{{ yh.ns.ns4 }}</td>
<td>{{ yh.ns.ip4 }}</td>
</tr>
</tbody>
</table>
</div>
</section>
<script type="text/javascript">
$(function() {
$('.youhosting-tabs a').bind('click',function(e){
e.preventDefault();
$(this).tab('show');
});
$('#open-cpanel').bind('click', function (e){
e.preventDefault();
bb.post('client/serviceyouhosting/cpanel_url',{order_id:{{ order.id }}},function(result){
window.open(result, '_blank');
});
});
});
</script>
{% endif %}
@@ -1,117 +0,0 @@
{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %}
{% import "macro_functions.phtml" as mf %}
{% block meta_title %}{{product.title}}{% endblock %}
{% block content_before %}
{% include "partial_steps.phtml" with {'selected': 2} %}
{% endblock %}
{% block content %}
{% set periods = guest.system_periods %}
{% set pricing = product.pricing %}
<form method="post" action="" class="api_form" data-api-url="guest/cart/add_item" data-api-redirect="{{ 'cart'|link }}">
<div class="h-block">
<div class="h-block-header">
<div class="icon"><span class="number">2</span></div>
<h2>{{ product.title }}</h2>
<p>{% trans 'Please configure domain for your hosting account' %}</p>
{#{ product.description|bbmd }#}
</div>
<div class="block">
<div class="clear"></div>
<div class="grid_8 alpha">
<div class="widget simpleTabs tabsRight" style="margin: 10px 0 10px 10px;">
<div class="head">
<h2 class="dark-icon i-services">{% trans 'Domain' %}</h2>
</div>
<ul class="tabs">
<li><a href="#domain" rel="domain"><span class="dark-icon"></span>{% trans 'Host my own domain' %}</a></li>
<li><a href="#subdomain" rel="subdomain"><span class="dark-icon"></span>{% trans 'Subdomain' %}</a></li>
</ul>
<div class="tabs_container">
<div class="tab_content" id="subdomain">
<fieldset>
<input type="text" name="subdomain" value="" placeholder="Subdomain"/> .
<select name="master_domain">
{% for d in guest.serviceyouhosting_master_domains %}
<option value="{{ d }}">{{ d }}</option>
{% endfor %}
</select>
</fieldset>
</div>
<div class="tab_content" id="domain">
<fieldset>
<input type="text" name="domain" value="{{ request.domain|default('domain.com') }}" style="width: 95%">
</fieldset>
</div>
</div>
</div>
</div>
<div class="grid_4 omega">
{% include 'partial_pricing.phtml' with {'product': product} %}
</div>
<div class="clear"></div>
</div>
</div>
{% include 'partial_addons.phtml' with {'product': product} %}
<input type="hidden" name="domain_type" value="domain" />
<input type="hidden" name="id" value="{{ product.id }}" />
</form>
{% endblock %}
{% block sidebar2 %}
{% include 'partial_currency.phtml' %}
{% endblock %}
{% block js %}
{% set currency = guest.cart_get_currency %}
<script type="text/javascript">
$(function() {
$('ul.tabs li a').bind('click', function (){
$('input[name="domain_type"]').val($(this).attr('rel'));
$(this).parents('ul').find('span.dark-icon')
.removeClass('i-check i-uncheck')
.addClass('i-uncheck');
$(this).find('span')
.removeClass('i-uncheck')
.addClass('i-check');
});
$('ul.tabs li a:first').click();
if($(".addons").length && $(".addons").is(':hidden')) {
$('#order-button').one('click', function(){
$(this).slideUp('fast');
$('.addons').slideDown('fast');
return false;
});
}
$('#period-selector').change(function(){
$('.period').hide();
$('.period.' + $(this).val()).show();
}).trigger('change');
$('.addon-period-selector').change(function(){
var r = $(this).attr('rel');
$('#' + r + ' span').hide();
$('#' + r + ' span.' + $(this).val()).fadeIn();
}).trigger('change');
});
</script>
{% endblock %}
@@ -1,47 +0,0 @@
{% set periods = guest.system_periods %}
{% set pricing = product.pricing %}
<section>
<div class="well">
<header><strong>{{ product.title }}</strong></header>
<strong>{% trans 'Domain configuration' %}</strong>
<div class="control-group">
<label class="radio">{% trans 'Subdomain' %}
<input type="radio" rel="subdomain" name="domain_type" value="subdomain" onclick="selectDomainAction(this);">
</label>
<label class="radio">{% trans 'Host my own domain' %}
<input type="radio" rel="domain" name="domain_type" value="domain" onclick="selectDomainAction(this);">
</label>
<div id="subdomain" class="domain_action" style="display: none;">
<fieldset>
<div class="row-fluid">
<div class="controls">
<input type="text" name="subdomain" value="" placeholder="Subdomain"/> .
<select name="master_domain">
{% for d in guest.serviceyouhosting_master_domains %}
<option value="{{ d }}">{{ d }}</option>
{% endfor %}
</select>
</div>
</div>
</fieldset>
</div>
<div id="domain" class="domain_action" style="display: none;">
<fieldset>
<div class="row-fluid">
<div class="controls">
<input type="text" name="domain" value="{{ request.domain }}" placeholder="domain.com">
</div>
</div>
</fieldset>
</div>
</div>
</div>
</section>
<script type="text/javascript">
function selectDomainAction(el)
{
$('.domain_action').hide();
$('#'+$(el).val()).show();
}
</script>
@@ -1,75 +0,0 @@
{% apply markdown %}
Hello {{ c.first_name }} {{ c.last_name }},
Thank you for ordering with us! Your hosting account has now been set up. This email contains all the information you will need in order to begin using your service.
If you have requested a domain name during the signup, please keep in mind that
your domain name will not be visible on the internet instantly.
This process is called propagation and can take up to 48 hours.
Your website and email will not function until your domain has propagated.
**{{ order.title }}**
Activated: {{ order.activated_at|bb_date }}
{% if order.expires_at %}Expires: {{ order.expires_at | date }} {% endif %}
{% if order.total %}Amount: {{ order.total | money(order.currency) }} {% endif %}
{% if order.period %} Billing period: {{ order.period | period_title }} {% endif %}
**New Account Information**
Hosting Package: {{ order.title }}
Domain: {{ account.domain }}
IP Address: {{ account.ip }}
**Control Panel Login Details**
Username: {{ account.username }}
Password: {{ password }}
**Server Information**
Server IP: {{ account.ip }}
If you are using an existing domain with your new hosting account, you will
need to update the domain settings to point it to the nameservers listed below.
Nameserver 1: {{ ns.ns1 }} {{ ns.ip1 }}
Nameserver 2: {{ ns.ns2 }} {{ ns.ip2 }}
{% if ns.ns3 %}Nameserver 3: {{ ns.ns3 }} {{ ns.ip3 }} {% endif %}
{% if ns.ns4 %}Nameserver 4: {{ ns.ns4 }} {{ ns.ip4 }} {% endif %}
**Uploading Your Website**
You may use one of the addresses given below to manage your web site:
Temporary FTP Hostname: {{ account.ip }}
Full FTP Hostname: {{ account.domain }}
FTP Username: {{ account.username }}
FTP Password: {{ account.password }}
You must upload files to the **public_html** folder!
Thank you for choosing us.
**Members area**
Login to members area: {{'login'|link({'email' : c.email }) }}
Manage order: {{ 'order/service/manage'|link }}/{{ order.id }}
{{ guest.system_company.signature }}
{% endapply %}
@@ -1,20 +0,0 @@
{% block subject %}[{{ guest.system_company.name }}] {{ order.title }} Canceled{% endblock %}
{% block content %}
{% apply markdown %}
Hello {{ c.first_name }} {{ c.last_name }},
Your *{{ order.title }}* that was activated at *{{ order.activated_at|bb_date }}* is now canceled.
{% if order.reason %} Reason:
**{{ order.reason }}** {% endif %}
If you have any questions regarding this message please login to the members area and submit a support ticket.
Login to members area: {{'login'|link({'email' : c.email }) }}
Submit support ticket: {{ 'support'|link({'ticket' : 1}) }}
{{ guest.system_company.signature }}
{% endapply %}
{% endblock %}
@@ -1,21 +0,0 @@
{% block subject %}[{{ guest.system_company.name }}] {{ order.title }} Renewed{% endblock %}
{% block content %}
{% apply markdown %}
Hello {{ c.first_name }} {{ c.last_name }},
Your **{{ order.title }}** has been renewed.
{% if order.expires_at %}
Next renewal date: {{ order.expires_at|bb_date }}
{% endif %}
Login to members area: {{'login'|link({'email' : c.email }) }}
Manage order: {{ 'order/service/manage'|link }}/{{ order.id }}
{{ guest.system_company.signature }}
{% endapply %}
{% endblock %}
@@ -1,20 +0,0 @@
{% block subject %}[{{ guest.system_company.name }}] {{ order.title }} Suspended{% endblock %}
{% block content %}
{% apply markdown %}
Hello {{ c.first_name }} {{ c.last_name }},
Your *{{ order.title }}* that was activated at *{{ order.activated_at|bb_date }}* is now suspended.
{% if order.reason %} Reason:
**{{ order.reason }}** {% endif %}
If you have any questions regarding this message please login to the members area and submit a support ticket.
Login to members area: {{'login'|link({'email' : c.email }) }}
Submit support ticket: {{ 'support'|link({'ticket' : 1}) }}
{{ guest.system_company.signature }}
{% endapply %}
{% endblock %}
@@ -1,15 +0,0 @@
{% block subject %}[{{ guest.system_company.name }}] {{ order.title }} Reactivated{% endblock %}
{% block content %}
{% apply markdown %}
Hello {{ c.first_name }} {{ c.last_name }},
Your *{{ order.title }}* has been reactivated.
Login to members area: {{'login'|link({'email' : c.email }) }}
Manage order: {{ 'order/service/manage'|link }}/{{ order.id }}
{{ guest.system_company.signature }}
{% endapply %}
{% endblock %}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

@@ -1,12 +0,0 @@
{
"id": "serviceyouhosting",
"type": "mod",
"name": "YouHosting product",
"description": "Sell YouHosting hosting services",
"icon_url": "icon.png",
"homepage_url": "http://github.com/boxbilling/",
"author": "BoxBilling",
"author_url": "http://extensions.boxbilling.com/",
"license": "http://www.boxbilling.com/license.txt",
"version": "1.0.0"
}
+179 -115
View File
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "bb2625c8b03b2a73e9c162a147bec097",
"content-hash": "e16ad934bf5352098dac46299287da67",
"packages": [
{
"name": "composer/ca-bundle",
@@ -131,16 +131,16 @@
},
{
"name": "guzzlehttp/guzzle",
"version": "7.1.0",
"version": "7.1.1",
"source": {
"type": "git",
"url": "https://github.com/guzzle/guzzle.git",
"reference": "7edeaa528fbb57123028bd5a76b9ce9540194e26"
"reference": "7427d6f99df41cc01f33cd59832f721c150ffdf3"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/7edeaa528fbb57123028bd5a76b9ce9540194e26",
"reference": "7edeaa528fbb57123028bd5a76b9ce9540194e26",
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/7427d6f99df41cc01f33cd59832f721c150ffdf3",
"reference": "7427d6f99df41cc01f33cd59832f721c150ffdf3",
"shasum": ""
},
"require": {
@@ -225,27 +225,27 @@
"type": "github"
}
],
"time": "2020-09-22T09:10:04+00:00"
"time": "2020-09-30T08:51:17+00:00"
},
{
"name": "guzzlehttp/promises",
"version": "v1.3.1",
"version": "1.4.0",
"source": {
"type": "git",
"url": "https://github.com/guzzle/promises.git",
"reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646"
"reference": "60d379c243457e073cff02bc323a2a86cb355631"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/guzzle/promises/zipball/a59da6cf61d80060647ff4d3eb2c03a2bc694646",
"reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646",
"url": "https://api.github.com/repos/guzzle/promises/zipball/60d379c243457e073cff02bc323a2a86cb355631",
"reference": "60d379c243457e073cff02bc323a2a86cb355631",
"shasum": ""
},
"require": {
"php": ">=5.5.0"
"php": ">=5.5"
},
"require-dev": {
"phpunit/phpunit": "^4.0"
"symfony/phpunit-bridge": "^4.4 || ^5.1"
},
"type": "library",
"extra": {
@@ -276,20 +276,20 @@
"keywords": [
"promise"
],
"time": "2016-12-20T10:07:11+00:00"
"time": "2020-09-30T07:37:28+00:00"
},
{
"name": "guzzlehttp/psr7",
"version": "1.6.1",
"version": "1.7.0",
"source": {
"type": "git",
"url": "https://github.com/guzzle/psr7.git",
"reference": "239400de7a173fe9901b9ac7c06497751f00727a"
"reference": "53330f47520498c0ae1f61f7e2c90f55690c06a3"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/guzzle/psr7/zipball/239400de7a173fe9901b9ac7c06497751f00727a",
"reference": "239400de7a173fe9901b9ac7c06497751f00727a",
"url": "https://api.github.com/repos/guzzle/psr7/zipball/53330f47520498c0ae1f61f7e2c90f55690c06a3",
"reference": "53330f47520498c0ae1f61f7e2c90f55690c06a3",
"shasum": ""
},
"require": {
@@ -302,15 +302,15 @@
},
"require-dev": {
"ext-zlib": "*",
"phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8"
"phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.10"
},
"suggest": {
"zendframework/zend-httphandlerrunner": "Emit PSR-7 responses"
"laminas/laminas-httphandlerrunner": "Emit PSR-7 responses"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.6-dev"
"dev-master": "1.7-dev"
}
},
"autoload": {
@@ -347,7 +347,7 @@
"uri",
"url"
],
"time": "2019-07-01T23:21:34+00:00"
"time": "2020-09-30T07:37:11+00:00"
},
{
"name": "ircmaxell/password-compat",
@@ -392,24 +392,143 @@
"time": "2014-11-20T16:49:30+00:00"
},
{
"name": "maxmind-db/reader",
"version": "v1.7.0",
"name": "laminas/laminas-httphandlerrunner",
"version": "1.2.0",
"source": {
"type": "git",
"url": "https://github.com/maxmind/MaxMind-DB-Reader-php.git",
"reference": "942553da239f12051275f9c666538b5dd09e2908"
"url": "https://github.com/laminas/laminas-httphandlerrunner.git",
"reference": "e1a5dad040e0043135e8095ee27d1fbf6fb640e1"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/maxmind/MaxMind-DB-Reader-php/zipball/942553da239f12051275f9c666538b5dd09e2908",
"reference": "942553da239f12051275f9c666538b5dd09e2908",
"url": "https://api.github.com/repos/laminas/laminas-httphandlerrunner/zipball/e1a5dad040e0043135e8095ee27d1fbf6fb640e1",
"reference": "e1a5dad040e0043135e8095ee27d1fbf6fb640e1",
"shasum": ""
},
"require": {
"laminas/laminas-zendframework-bridge": "^1.0",
"php": "^7.1",
"psr/http-message": "^1.0",
"psr/http-message-implementation": "^1.0",
"psr/http-server-handler": "^1.0"
},
"replace": {
"zendframework/zend-httphandlerrunner": "^1.1.0"
},
"require-dev": {
"laminas/laminas-coding-standard": "~1.0.0",
"laminas/laminas-diactoros": "^1.7 || ^2.1.1",
"phpunit/phpunit": "^7.0.2"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.2.x-dev",
"dev-develop": "1.3.x-dev"
},
"laminas": {
"config-provider": "Laminas\\HttpHandlerRunner\\ConfigProvider"
}
},
"autoload": {
"psr-4": {
"Laminas\\HttpHandlerRunner\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"description": "Execute PSR-15 RequestHandlerInterface instances and emit responses they generate.",
"homepage": "https://laminas.dev",
"keywords": [
"components",
"laminas",
"mezzio",
"psr-15",
"psr-7"
],
"funding": [
{
"url": "https://funding.communitybridge.org/projects/laminas-project",
"type": "community_bridge"
}
],
"time": "2020-06-03T15:52:17+00:00"
},
{
"name": "laminas/laminas-zendframework-bridge",
"version": "1.1.1",
"source": {
"type": "git",
"url": "https://github.com/laminas/laminas-zendframework-bridge.git",
"reference": "6ede70583e101030bcace4dcddd648f760ddf642"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laminas/laminas-zendframework-bridge/zipball/6ede70583e101030bcace4dcddd648f760ddf642",
"reference": "6ede70583e101030bcace4dcddd648f760ddf642",
"shasum": ""
},
"require": {
"php": "^5.6 || ^7.0 || ^8.0"
},
"require-dev": {
"phpunit/phpunit": "^5.7 || ^6.5 || ^7.5 || ^8.1 || ^9.3",
"squizlabs/php_codesniffer": "^3.5"
},
"type": "library",
"extra": {
"laminas": {
"module": "Laminas\\ZendFrameworkBridge"
}
},
"autoload": {
"files": [
"src/autoload.php"
],
"psr-4": {
"Laminas\\ZendFrameworkBridge\\": "src//"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"description": "Alias legacy ZF class names to Laminas Project equivalents.",
"keywords": [
"ZendFramework",
"autoloading",
"laminas",
"zf"
],
"funding": [
{
"url": "https://funding.communitybridge.org/projects/laminas-project",
"type": "community_bridge"
}
],
"time": "2020-09-14T14:23:00+00:00"
},
{
"name": "maxmind-db/reader",
"version": "v1.8.0",
"source": {
"type": "git",
"url": "https://github.com/maxmind/MaxMind-DB-Reader-php.git",
"reference": "b566d429ac9aec10594b0935be8ff38302f8d5c8"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/maxmind/MaxMind-DB-Reader-php/zipball/b566d429ac9aec10594b0935be8ff38302f8d5c8",
"reference": "b566d429ac9aec10594b0935be8ff38302f8d5c8",
"shasum": ""
},
"require": {
"php": ">=7.2"
},
"conflict": {
"ext-maxminddb": "<1.7.0,>=2.0.0"
"ext-maxminddb": "<1.8.0,>=2.0.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "2.*",
@@ -449,31 +568,31 @@
"geolocation",
"maxmind"
],
"time": "2020-08-07T22:10:05+00:00"
"time": "2020-10-01T17:30:21+00:00"
},
{
"name": "maxmind/web-service-common",
"version": "v0.7.0",
"version": "v0.8.0",
"source": {
"type": "git",
"url": "https://github.com/maxmind/web-service-common-php.git",
"reference": "74c996c218ada5c639c8c2f076756e059f5552fc"
"reference": "ba67d9532cfaf499bd71774b8170d05df4f75fb7"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/maxmind/web-service-common-php/zipball/74c996c218ada5c639c8c2f076756e059f5552fc",
"reference": "74c996c218ada5c639c8c2f076756e059f5552fc",
"url": "https://api.github.com/repos/maxmind/web-service-common-php/zipball/ba67d9532cfaf499bd71774b8170d05df4f75fb7",
"reference": "ba67d9532cfaf499bd71774b8170d05df4f75fb7",
"shasum": ""
},
"require": {
"composer/ca-bundle": "^1.0.3",
"ext-curl": "*",
"ext-json": "*",
"php": ">=5.6"
"php": ">=7.2"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "2.*",
"phpunit/phpunit": "^4.8.36 || ^5.7 || ^6.5 || ^7.0",
"phpunit/phpunit": "^8.0 || ^9.0",
"squizlabs/php_codesniffer": "3.*"
},
"type": "library",
@@ -495,7 +614,7 @@
],
"description": "Internal MaxMind Web Service API",
"homepage": "https://github.com/maxmind/web-service-common-php",
"time": "2020-05-06T14:07:26+00:00"
"time": "2020-10-01T15:28:36+00:00"
},
{
"name": "michelf/php-markdown",
@@ -1496,6 +1615,7 @@
"i18n",
"text"
],
"abandoned": true,
"time": "2018-12-05T18:34:18+00:00"
},
{
@@ -1572,62 +1692,6 @@
}
],
"time": "2020-08-05T15:09:04+00:00"
},
{
"name": "zendframework/zend-httphandlerrunner",
"version": "1.1.0",
"source": {
"type": "git",
"url": "https://github.com/zendframework/zend-httphandlerrunner.git",
"reference": "75fb12751fe9d6e392cce1ee0d687dacae2db787"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/zendframework/zend-httphandlerrunner/zipball/75fb12751fe9d6e392cce1ee0d687dacae2db787",
"reference": "75fb12751fe9d6e392cce1ee0d687dacae2db787",
"shasum": ""
},
"require": {
"php": "^7.1",
"psr/http-message": "^1.0",
"psr/http-message-implementation": "^1.0",
"psr/http-server-handler": "^1.0"
},
"require-dev": {
"phpunit/phpunit": "^7.0.2",
"zendframework/zend-coding-standard": "~1.0.0",
"zendframework/zend-diactoros": "^1.7 || ^2.1.1"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.1.x-dev",
"dev-develop": "1.2.x-dev"
},
"zf": {
"config-provider": "Zend\\HttpHandlerRunner\\ConfigProvider"
}
},
"autoload": {
"psr-4": {
"Zend\\HttpHandlerRunner\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"description": "Execute PSR-15 RequestHandlerInterface instances and emit responses they generate.",
"keywords": [
"ZendFramework",
"components",
"expressive",
"psr-15",
"psr-7",
"zf"
],
"abandoned": "laminas/laminas-httphandlerrunner",
"time": "2019-02-19T18:20:34+00:00"
}
],
"packages-dev": [
@@ -2067,16 +2131,16 @@
},
{
"name": "phpunit/php-code-coverage",
"version": "9.1.11",
"version": "9.2.0",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
"reference": "c9394cb9d07ecfa9351b96f2e296bad473195f4d"
"reference": "53a4b737e83be724efd2bc4e7b929b9a30c48972"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/c9394cb9d07ecfa9351b96f2e296bad473195f4d",
"reference": "c9394cb9d07ecfa9351b96f2e296bad473195f4d",
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/53a4b737e83be724efd2bc4e7b929b9a30c48972",
"reference": "53a4b737e83be724efd2bc4e7b929b9a30c48972",
"shasum": ""
},
"require": {
@@ -2104,7 +2168,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "9.1-dev"
"dev-master": "9.2-dev"
}
},
"autoload": {
@@ -2136,7 +2200,7 @@
"type": "github"
}
],
"time": "2020-09-19T05:29:17+00:00"
"time": "2020-10-02T03:37:32+00:00"
},
{
"name": "phpunit/php-file-iterator",
@@ -2365,16 +2429,16 @@
},
{
"name": "phpunit/phpunit",
"version": "9.3.11",
"version": "9.4.0",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
"reference": "f7316ea106df7c9507f4fdaa88c47bc10a3b27a1"
"reference": "ef533467a7974c4b6c354f3eff42a115910bd4e5"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/f7316ea106df7c9507f4fdaa88c47bc10a3b27a1",
"reference": "f7316ea106df7c9507f4fdaa88c47bc10a3b27a1",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/ef533467a7974c4b6c354f3eff42a115910bd4e5",
"reference": "ef533467a7974c4b6c354f3eff42a115910bd4e5",
"shasum": ""
},
"require": {
@@ -2390,7 +2454,7 @@
"phar-io/version": "^3.0.2",
"php": ">=7.3",
"phpspec/prophecy": "^1.11.1",
"phpunit/php-code-coverage": "^9.1.11",
"phpunit/php-code-coverage": "^9.2",
"phpunit/php-file-iterator": "^3.0.4",
"phpunit/php-invoker": "^3.1",
"phpunit/php-text-template": "^2.0.2",
@@ -2421,7 +2485,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "9.3-dev"
"dev-master": "9.4-dev"
}
},
"autoload": {
@@ -2460,7 +2524,7 @@
"type": "github"
}
],
"time": "2020-09-24T08:08:49+00:00"
"time": "2020-10-02T03:54:37+00:00"
},
{
"name": "sebastian/cli-parser",
@@ -2516,16 +2580,16 @@
},
{
"name": "sebastian/code-unit",
"version": "1.0.6",
"version": "1.0.7",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/code-unit.git",
"reference": "d3a241b6028ff9d8e97d2b6ebd4090d01f92fad8"
"reference": "59236be62b1bb9919e6d7f60b0b832dc05cef9ab"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/d3a241b6028ff9d8e97d2b6ebd4090d01f92fad8",
"reference": "d3a241b6028ff9d8e97d2b6ebd4090d01f92fad8",
"url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/59236be62b1bb9919e6d7f60b0b832dc05cef9ab",
"reference": "59236be62b1bb9919e6d7f60b0b832dc05cef9ab",
"shasum": ""
},
"require": {
@@ -2564,7 +2628,7 @@
"type": "github"
}
],
"time": "2020-09-28T05:28:46+00:00"
"time": "2020-10-02T14:47:54+00:00"
},
{
"name": "sebastian/code-unit-reverse-lookup",
@@ -2619,16 +2683,16 @@
},
{
"name": "sebastian/comparator",
"version": "4.0.4",
"version": "4.0.5",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/comparator.git",
"reference": "e717aabeafe4eac045d3e947dad3207118664c72"
"reference": "7a8ff306445707539c1a6397372a982a1ec55120"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/e717aabeafe4eac045d3e947dad3207118664c72",
"reference": "e717aabeafe4eac045d3e947dad3207118664c72",
"url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/7a8ff306445707539c1a6397372a982a1ec55120",
"reference": "7a8ff306445707539c1a6397372a982a1ec55120",
"shasum": ""
},
"require": {
@@ -2685,7 +2749,7 @@
"type": "github"
}
],
"time": "2020-09-28T05:31:46+00:00"
"time": "2020-09-30T06:47:25+00:00"
},
{
"name": "sebastian/complexity",