hostilica Posted July 27, 2017 Share Posted July 27, 2017 Hello I would like to make everything automatic for accepting orders upon payment is received. I have unchecked the option "Only Auto Provision for Existing" in General Settings >> Ordering (Check attached picture Provision.png) 1. I registered a domain name and I paid it successfully but in WHMCS is showing "Pending" (Check attached picture WHMCS-Domain.png) 2. The same for registering an hosting service (Check attached picture WHMCS-Hosting.png) 3. The order in the client's account is automatically activated and enable to use (Check attached picture Client-Domain.png) What I should do if I want WHMCS to show the order "Active" instead of "Pending"? Thank you 0 Quote Link to comment Share on other sites More sharing options...
AffordableDomainsCanada Posted July 27, 2017 Share Posted July 27, 2017 (edited) 1. I registered a domain name and I paid it successfully but in WHMCS is showing "Pending" (Check attached picture WHMCS-Domain.png) Under Setup >> Products/Services >> Domain Pricing >> Make sure there is a registrar set for the Auto Registration! Was the domain registered with the registrar???? 2. The same for registering an hosting service Under Setup >> Products/Services >> Products/Services >> Select Product >> On the Module Settings tab, Near the bottom select Automatically setup the product as soon as the first payment is received - - - Updated - - - What I should do if I want WHMCS to show the order "Active" instead of "Pending"? Press the 'Accept Order' Button. Edited July 27, 2017 by AffordableDomainsCanada 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted July 27, 2017 Share Posted July 27, 2017 there used to be a free 'Auto Accept' hook that worked with previous versions... forum -> https://forum.whmcs.com/showthread.php?88594-Auto-Accept-Orders-for-WHMCS docs -> https://docs.jetapps.com/category/whmcs-addons/whmcs-auto-accept-orders download -> https://github.com/Jetserver/WHMCS-Auto-Accept-Orders whether it still works with v7 I don't know - though I can't see anything obvious in the code that would prevent it from doing so. if you want to pay for a solution, there's the Order Assistant addon available in Marketplace too. 0 Quote Link to comment Share on other sites More sharing options...
AffordableDomainsCanada Posted July 27, 2017 Share Posted July 27, 2017 Yes it still works! 0 Quote Link to comment Share on other sites More sharing options...
hostilica Posted July 28, 2017 Author Share Posted July 28, 2017 Under Setup >> Products/Services >> Domain Pricing >> Make sure there is a registrar set for the Auto Registration!Was the domain registered with the registrar???? Under Setup >> Products/Services >> Products/Services >> Select Product >> On the Module Settings tab, Near the bottom select Automatically setup the product as soon as the first payment is received - - - Updated - - - Press the 'Accept Order' Button. Offcourse I did all of that but this is not the solution for my question. By the way, thanks for your help. 0 Quote Link to comment Share on other sites More sharing options...
WHMCS ChrisD Posted July 28, 2017 Share Posted July 28, 2017 Hi Hostillca, You would need to use a hook to achieve this as provided by Brian! the orders show as pending until you manually accept as a form of fraud protection 0 Quote Link to comment Share on other sites More sharing options...
Slocern Posted July 28, 2017 Share Posted July 28, 2017 whether it still works with v7 I don't know - though I can't see anything obvious in the code that would prevent it from doing so. Thanks I just tried that hook and it still works! 0 Quote Link to comment Share on other sites More sharing options...
hostilica Posted July 28, 2017 Author Share Posted July 28, 2017 there used to be a free 'Auto Accept' hook that worked with previous versions... forum -> https://forum.whmcs.com/showthread.php?88594-Auto-Accept-Orders-for-WHMCS docs -> https://docs.jetapps.com/category/whmcs-addons/whmcs-auto-accept-orders download -> https://github.com/Jetserver/WHMCS-Auto-Accept-Orders whether it still works with v7 I don't know - though I can't see anything obvious in the code that would prevent it from doing so. if you want to pay for a solution, there's the Order Assistant addon available in Marketplace too. Perfect, that's what I exactly need Thank you 0 Quote Link to comment Share on other sites More sharing options...
hostilica Posted July 28, 2017 Author Share Posted July 28, 2017 Hi Hostillca, You would need to use a hook to achieve this as provided by Brian! the orders show as pending until you manually accept as a form of fraud protection I tried the hook and it works fine.. Thank you 0 Quote Link to comment Share on other sites More sharing options...
webjive Posted August 30, 2022 Share Posted August 30, 2022 https://github.com/Katamaze/WHMCS-Action-Hook-Factory/blob/master/hooks/AcceptOrderOnInvociePaid.php 0 Quote Link to comment Share on other sites More sharing options...
Craft Posted October 28, 2023 Share Posted October 28, 2023 (edited) On 8/30/2022 at 10:47 PM, webjive said: https://github.com/Katamaze/WHMCS-Action-Hook-Factory/blob/master/hooks/AcceptOrderOnInvociePaid.php Hi @webjive, I tried your hook but it doesn't work. I'm using WHMCS v8.6.1 Any suggestion? Edited October 28, 2023 by Craft 0 Quote Link to comment Share on other sites More sharing options...
Faruq Posted November 19, 2023 Share Posted November 19, 2023 On 10/29/2023 at 12:11 AM, Craft said: Hi @webjive, I tried your hook but it doesn't work. I'm using WHMCS v8.6.1 Any suggestion? Has Anyone found a solution to this thread. Using ver 8.8.0 0 Quote Link to comment Share on other sites More sharing options...
RADRaze2KX Posted February 13 Share Posted February 13 Also looking for a solution to this for v8.8.0+ (using 8.9) 0 Quote Link to comment Share on other sites More sharing options...
Julian Lang Posted September 6 Share Posted September 6 <?php use WHMCS\Database\Capsule; add_hook('AfterShoppingCartCheckout', 1, function($vars) { $orderId = $vars['OrderID']; $adminuser = 'youradminusername'; try { $postData = [ 'orderid' => $orderId, 'autosetup' => true, 'sendemail' => true, ]; $results = localAPI('AcceptOrder', $postData, $adminuser); if ($results['result'] != 'success') { logActivity('Error auto accepting new Order: ' . $results['message']); } } catch (Exception $e) { logActivity('Error: ' . $e->getMessage()); } }); This will work with the current version 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.