@@ -218,7 +218,7 @@ public function domainRegister(array $row): array
218
218
$ zone = $ this ->getZone ($ row );
219
219
$ row = $ this ->_domainSetFee ($ row , 'create ' );
220
220
221
- if (!empty ($ row ['fee ' ]) && floatval ((string ) $ row ['fee ' ]) !== floatval ((string ) $ row ['standart_price ' ])) {
221
+ if (!empty ($ row ['fee ' ]) && floatval ((string ) $ row ['fee ' ]) > floatval ((string ) $ row ['standart_price ' ])) {
222
222
throw new Exception ($ row ['reason ' ]);
223
223
}
224
224
@@ -233,6 +233,7 @@ public function domainRegister(array $row): array
233
233
'pw ' => $ row ['password ' ] ?? $ this ->generatePassword (16 ),
234
234
'secDNS ' => $ row ['secDNS ' ] ?? null ,
235
235
'fee ' => $ row ['fee ' ] ?? null ,
236
+ 'category_name ' => $ row ['category_name ' ] ?? null ,
236
237
'neulevel ' => $ zone === 'tel ' ? implode (' ' , [
237
238
"WhoisType=NATURAL " ,
238
239
"Publish= " . ($ row ['whois_protected ' ] ? 'N ' : 'Y ' ),
@@ -327,7 +328,13 @@ public function domainDelete(array $row): array
327
328
public function domainsDelete (array $ rows ): array
328
329
{
329
330
foreach ($ rows as $ id => $ row ) {
330
- $ res [$ id ] = $ this ->tool ->domainDelete ($ row );
331
+ try {
332
+ $ res [$ id ] = $ this ->tool ->domainDelete ($ row );
333
+ } catch (Throwable $ e ) {
334
+ $ res [$ id ] = array_merge ($ row , [
335
+ '_error ' => $ e ->getMessage (),
336
+ ]);
337
+ }
331
338
}
332
339
333
340
return $ res ;
@@ -341,7 +348,7 @@ public function domainRenew(array $row, ?bool $expired = false): array
341
348
{
342
349
$ row = $ this ->_domainSetFee ($ row , 'renew ' );
343
350
344
- if (!empty ($ row ['fee ' ]) && floatval ((string ) $ row ['fee ' ]) !== floatval ((string ) $ row ['standart_price ' ])) {
351
+ if (!empty ($ row ['fee ' ]) && floatval ((string ) $ row ['fee ' ]) > floatval ((string ) $ row ['standart_price ' ])) {
345
352
throw new Exception ($ row ['reason ' ]);
346
353
}
347
354
@@ -414,7 +421,7 @@ public function domainCheckTransfer(array $row) : array
414
421
public function domainTransfer (array $ row ): array
415
422
{
416
423
$ row = $ this ->_domainSetFee ($ row , 'transfer ' );
417
- if (!empty ($ row ['fee ' ]) && floatval ((string ) $ row ['fee ' ]) !== floatval ((string ) $ row ['standart_price ' ])) {
424
+ if (!empty ($ row ['fee ' ]) && floatval ((string ) $ row ['fee ' ]) > floatval ((string ) $ row ['standart_price ' ])) {
418
425
throw new Excepion ($ row ['reason ' ]);
419
426
}
420
427
@@ -758,7 +765,7 @@ protected function domainCheck(string $domain, ?string $command = null): array
758
765
}
759
766
}
760
767
761
- if ($ res ['premium ' ] === self ::DOMAIN_PREMIUM && !empty ($ res ['fee ' ]['category_name ' ])) {
768
+ if (isset ( $ res [ ' premium ' ]) && $ res ['premium ' ] === self ::DOMAIN_PREMIUM && !empty ($ res ['fee ' ]['category_name ' ])) {
762
769
return $ res ;
763
770
} else {
764
771
$ checkPremium = $ this ->_domainCheck ($ domain , false , $ command ?? 'create ' );
@@ -901,12 +908,16 @@ protected function _domainSetFee(array $row, string $op, bool $allFee = false):
901
908
if ($ fee == $ row ['standart_price ' ] && in_array ($ op , ['renew ' , 'transfer ' ], true )) {
902
909
return array_merge ($ row , array_filter ([
903
910
'fee ' => $ fee ,
911
+ 'category ' => $ data ['category ' ],
912
+ 'category_name ' => $ data ['category_name ' ],
904
913
]));
905
914
}
906
915
907
916
return array_merge ($ row , array_filter ([
908
917
'fee ' => $ fee ,
909
918
'reason ' => self ::DOMAIN_PREMIUM_REASON ,
919
+ 'category ' => $ data ['category ' ],
920
+ 'category_name ' => $ data ['category_name ' ],
910
921
'allFee ' => $ allFee === true ? $ data ['fee ' ] : null ,
911
922
]));
912
923
}
@@ -998,7 +1009,6 @@ private function domainUpdate(array $row, array $keysys = null, array $neulevel
998
1009
if (empty ($ data )) {
999
1010
return $ row ;
1000
1011
}
1001
-
1002
1012
try {
1003
1013
return $ this ->tool ->commonRequest ("{$ this ->object }:update " , array_filter ([
1004
1014
'name ' => $ row ['domain ' ],
0 commit comments