Jump to content

Auto Accept Orders


hostilica

Recommended Posts

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 :)

WHMCS-Domain.png

WHMCS-Hosting.png

Client-Domain.png

Provision.png

Link to comment
Share on other sites

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 by AffordableDomainsCanada
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 :)

Link to comment
Share on other sites

  • 5 years later...
  • 1 year later...
  • 3 weeks later...
  • 2 months later...
  • 6 months later...
<?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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated