Skip to content

Commit 0e3d196

Browse files
committed
update
1 parent 7b1e6c0 commit 0e3d196

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

app/Http/Controllers/PackagesJsonController.php

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,7 @@ public function validateLicenses($request, $whmcsServerId)
561561
//dd($_SERVER);
562562
if (isset($_SERVER["HTTP_AUTHORIZATION"]) && (strpos(strtolower($_SERVER["HTTP_AUTHORIZATION"]), 'basic') !== false)) {
563563

564-
/// file_put_contents(base_path().'/lic.txt', print_r((substr($_SERVER["HTTP_AUTHORIZATION"], 6)),1));
564+
// file_put_contents(base_path().'/lic11.txt', print_r((substr($_SERVER["HTTP_AUTHORIZATION"], 6)),1));
565565

566566
$userLicenseKeys = base64_decode(substr($_SERVER["HTTP_AUTHORIZATION"], 6));
567567

@@ -594,6 +594,9 @@ public function validateLicenses($request, $whmcsServerId)
594594
$userLicenseKeysForValidation[]['local_key'] = $userLicenseKeys;
595595
}
596596
}
597+
// file_put_contents(base_path().'/lic22.txt', print_r($userLicenseKeysForValidation ,1));
598+
// file_put_contents(base_path().'/lic33.txt', print_r($userLicenseKeys ,1));
599+
// file_put_contents(base_path().'/lic444.txt', print_r($_SERVER ,1));
597600

598601
$userLicenseKeysMap = [];
599602

@@ -612,7 +615,9 @@ public function validateLicenses($request, $whmcsServerId)
612615
foreach ($userLicenseKeysMap as $k=>$userLicenseKey) {
613616

614617
$consumeLicense = MicroweberSAASLicenseValidatorHelper::getLicenseStatus($userLicenseKey);
615-
if (isset($consumeLicense['status']) && strtolower($consumeLicense['status'])=='active') {
618+
619+
620+
if (isset($consumeLicense['status']) && strtolower($consumeLicense['status'])=='active') {
616621

617622
$whmcsProductId = false;
618623
if (isset($consumeLicense['package_id'])) {
@@ -623,6 +628,9 @@ public function validateLicenses($request, $whmcsServerId)
623628
'whmcs_product_id'=> $whmcsProductId,
624629
'license'=> $userLicenseKey,
625630
];
631+
632+
633+
626634
} else {
627635
$messaage = '';
628636
$status = '';

0 commit comments

Comments
 (0)