Jump to content

Fraudulent purchase notification or notice


Recommended Posts

I sincerely apologize if this question is already posted, but I couldn't find an answer to it.
When a customer makes a purchase, the notification arrives, regardless of whether the purchase was fraudulent or genuine.
My query is: is there a way to add to the notification of the purchase if the purchase was fraudulent? That is, some means to be able to recognize if the purchase was marked as fraudulent or genuine.

Thank you very much

Link to comment
Share on other sites

<?php

use WHMCS\Database\Capsule;

add_hook('FraudOrder', 1, function($vars)
{
    $admins = Capsule::table('tbladmins')->where('disabled', '=', '0')->pluck('username');

    foreach ($admins as $username)
    {
        localAPI('SendAdminEmail', array('type' => 'system', 'customsubject' => 'Fraud Order Detected', 'custommessage' => 'Order #' . $vars['orderid'] . ' detected as Fraudulent'), $username);
    }
});

It should work. It sends the notification to all active administrators.

Link to comment
Share on other sites

54 minutes ago, Kian said:

<?php

use WHMCS\Database\Capsule;

add_hook('FraudOrder', 1, function($vars)
{
    $admins = Capsule::table('tbladmins')->where('disabled', '=', '0')->pluck('username');

    foreach ($admins as $username)
    {
        localAPI('SendAdminEmail', array('type' => 'system', 'customsubject' => 'Fraud Order Detected', 'custommessage' => 'Order #' . $vars['orderid'] . ' detected as Fraudulent'), $username);
    }
});

It should work. It sends the notification to all active administrators.

Thank you very much!
You're the best!

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