Skip to content

Commit 1e4f587

Browse files
committed
domain renew bug fixed
1 parent e0fc1a5 commit 1e4f587

2 files changed

Lines changed: 4 additions & 6 deletions

File tree

README.MD

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,8 @@ logicboxes()->domain('domain-name.tld')->modifyAuthCode('authcode');
149149
// modify Auth Code
150150
logicboxes()->domain('domain-name.tld')->validateTransferRequest();
151151

152-
// renew domain
153-
logicboxes()->domain('domain-name.tld')->renew($years, $invoiceOption, true);
152+
// renew domain ($date => epochtime)
153+
logicboxes()->domain('domain-name.tld')->renew($years, $date, $invoiceOption, true);
154154
// $purchasePrivacy is default false
155155

156156
// deafult customer nameservers

src/Api/Domain.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -249,13 +249,11 @@ public function validateTransferRequest()
249249
*
250250
* @return array
251251
*/
252-
public function renew($years, $invoiceOption, $purchasePrivacy = false)
252+
public function renew($years, $date, $invoiceOption, $purchasePrivacy = false)
253253
{
254-
$end_time = $this->details()['response']->endtime;
255-
256254
$query = [
257255
'years' => $years,
258-
'exp-date' => $end_time,
256+
'exp-date' => $date,
259257
'invoice-option' => $invoiceOption,
260258
'purchase-privacy' => $purchasePrivacy,
261259
];

0 commit comments

Comments
 (0)