dotnetrix Posted February 9, 2017 Share Posted February 9, 2017 Hi all, I am using the Local API to add a new order, for domain renewal at a different price. The information I am using is coming from https://developers.whmcs.com/api-reference/addorder/ The order gets added to the cart, it generates an invoice etc. BUT, the "domainrenewoverride" parameter is not working, so the renewal price is not getting updated. $command = 'AddOrder'; $adminUsername = 'Admin'; $postData["clientid"] = $uid; $postData["paymentmethod"] = 'offlinecc'; $postData["domainrenewals"] = array(); foreach ($_POST['renewthesedomains'] as $key => $value) { $postData["domainrenewals"][$value] = "1"; } $postData["domainrenewoverride"] = 285.00; var_dump ($postData); $results = localAPI($command, $postData, $adminUsername); print_r($results); The var_dump shows: array(4) { ["clientid"]=> int(1) ["paymentmethod"]=> string(12) "offlinecc" ["domainrenewals"]=> array(2) { ["domain1.com"]=> string(1) "1" ["domain2.com"]=> string(1) "1" } ["domainrenewoverride"]=> array(1) { [0]=> float(285) } } But the actual renewal price for the domains do not get adjusted to 285.00 Any ideas would be appreciated. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted February 9, 2017 Share Posted February 9, 2017 can you add an order for a domain renewal.... for a new registration or transfer, yes - but a renewal? my reading of that documentation is that it's to be used to register/transfer a domain and domainrenewoverride can optionally be used to set the renewal price (e.g the recurring price) to be used when the domain is due for renewal in the future. 0 Quote Link to comment Share on other sites More sharing options...
dotnetrix Posted February 9, 2017 Author Share Posted February 9, 2017 Indeed the code worked and I place successful orders for the renewals. As you know from my previous posts I am trying to solve a Closed Redemption issue and proceeded to write a Addon Module which lists expired domains for clients, more than 45 day ago. I can successfully place a domain renewal order for selected domains from a addon module page. Only issue now is is using the "domainrenewoverride" parameter to change the price for each domain to 285.00 float. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.