-
Notifications
You must be signed in to change notification settings - Fork 123
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #848 from ladybirdweb/development
Development
- Loading branch information
Showing
34 changed files
with
307 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -153,8 +153,12 @@ public function createNewLicene($orderid, $product, $user_id, | |
$order = Order::where('id', $orderid)->first(); | ||
$orderNo = $order->number; | ||
$domain = $order->domain; | ||
$ipAndDomain = $this->getIpAndDomain($domain); | ||
$ip = $ipAndDomain['ip']; | ||
$domain = $ipAndDomain['domain']; | ||
$requiredomain = $ipAndDomain['requiredomain']; | ||
$productId = $this->searchProductId($sku); | ||
$addLicense = $this->postCurl($url, "api_key_secret=$api_key_secret&api_function=licenses_add&product_id=$productId&license_code=$serial_key&license_require_domain=1&license_status=1&license_order_number=$orderNo&license_domain=$domain&license_limit=6&license_expire_date=$licenseExpiry&license_updates_date=$updatesExpiry&license_support_date=$supportExpiry&license_disable_ip_verification=0"); | ||
$addLicense = $this->postCurl($url, "api_key_secret=$api_key_secret&api_function=licenses_add&product_id=$productId&license_code=$serial_key&license_require_domain=1&license_status=1&license_order_number=$orderNo&license_domain=$domain&&license_ip=$ip&license_require_domain=$requiredomain&license_limit=6&license_expire_date=$licenseExpiry&license_updates_date=$updatesExpiry&license_support_date=$supportExpiry&license_disable_ip_verification=0&license_limit=2"); | ||
} | ||
|
||
/* | ||
|
@@ -175,6 +179,33 @@ public function updateLicensedDomain($licenseCode, $domain, $productId, $license | |
$s_expiry = date('Y-m-d', strtotime($supportExpiry)); | ||
} | ||
$url = $this->url; | ||
|
||
$ipAndDomain = $this->getIpAndDomain($domain); | ||
$ip = $ipAndDomain['ip']; | ||
$domain = $ipAndDomain['domain']; | ||
$requiredomain = $ipAndDomain['requiredomain']; | ||
|
||
$api_key_secret = $this->api_key_secret; | ||
$searchLicense = $this->searchLicenseId($licenseCode, $productId); | ||
$licenseId = $searchLicense['licenseId']; | ||
$productId = $searchLicense['productId']; | ||
$licenseCode = $searchLicense['code']; | ||
$updateLicense = $this->postCurl($url, "api_key_secret=$api_key_secret&api_function=licenses_edit&product_id=$productId&license_code=$licenseCode&license_id=$licenseId&license_order_number=$orderNo&license_require_domain=$requiredomain&license_status=1&license_expire_date=$l_expiry&license_updates_date=$u_expiry&license_support_date=$s_expiry&license_domain=$domain&license_ip=$ip&license_limit=2"); | ||
} | ||
|
||
/** | ||
* Get the Ip and domain that is to be entered in License Manager. | ||
* | ||
* @author Ashutosh Pathak <[email protected]> | ||
* | ||
* @date 2019-05-11T11:31:07+0530 | ||
* | ||
* @param string $domain | ||
* | ||
* @return array | ||
*/ | ||
protected function getIpAndDomain($domain) | ||
{ | ||
$isIP = (bool) ip2long($domain); | ||
if ($isIP == true) { | ||
$requiredomain = 0; | ||
|
@@ -185,12 +216,8 @@ public function updateLicensedDomain($licenseCode, $domain, $productId, $license | |
$domain = $domain; | ||
$ip = ''; | ||
} | ||
$api_key_secret = $this->api_key_secret; | ||
$searchLicense = $this->searchLicenseId($licenseCode, $productId); | ||
$licenseId = $searchLicense['licenseId']; | ||
$productId = $searchLicense['productId']; | ||
$licenseCode = $searchLicense['code']; | ||
$updateLicense = $this->postCurl($url, "api_key_secret=$api_key_secret&api_function=licenses_edit&product_id=$productId&license_code=$licenseCode&license_id=$licenseId&license_order_number=$orderNo&license_require_domain=$requiredomain&license_status=1&license_expire_date=$l_expiry&license_updates_date=$u_expiry&license_support_date=$s_expiry&license_domain=$domain&license_ip=$ip&license_limit=2"); | ||
|
||
return ['ip'=>$ip, 'domain'=>$domain, 'requiredomain'=>$requiredomain]; | ||
} | ||
|
||
public function searchLicenseId($licenseCode, $productId) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
<?php | ||
|
||
|
||
return [ | ||
|
||
'name' => 'Paypal', | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
database/migrations/2019_07_08_095503_add_allow_domain_check_to_status_settings.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
|
||
use Illuminate\Database\Migrations\Migration; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Support\Facades\Schema; | ||
|
||
class AddAllowDomainCheckToStatusSettings extends Migration | ||
{ | ||
/** | ||
* Run the migrations. | ||
* | ||
* @return void | ||
*/ | ||
public function up() | ||
{ | ||
Schema::table('status_settings', function (Blueprint $table) { | ||
$table->boolean('domain_check')->default(0); | ||
}); | ||
} | ||
|
||
/** | ||
* Reverse the migrations. | ||
* | ||
* @return void | ||
*/ | ||
public function down() | ||
{ | ||
Schema::dropIfExists('status_settings'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.