Jump to content

Recommended Posts


Posted
1 hora atrás, William Marques disse:

Alguém sabe me dizer como configurar o WHMCS para me avisar por e-mail quando um cliente pagar uma fatura avulsa?

Por padrão isso não é possível para nenhum tipo de fatura.

Criando uma customização via hook ( https://developers.whmcs.com/hooks-reference/invoices-and-quotes/#invoicepaid ) + integração via API ( https://developers.whmcs.com/api-reference/sendadminemail/ ) é possível.

Posted

Oi !

Em "Administrator Roles" você tem a opção de receber - ou não - mensagens do WHMCS, entre elas, avisos de baixas em pagamentos, geração de faturas, etc. Isso não serve?

Posted
14 horas atrás, Paula disse:

Oi !

Em "Administrator Roles" você tem a opção de receber - ou não - mensagens do WHMCS, entre elas, avisos de baixas em pagamentos, geração de faturas, etc. Isso não serve?

O sistema não tem notificações para baixas de pagamento.

A notificação diária "WHMCS Cron Job Activity" exibe um resumo das faturas, lembretes, multas e etc...

Posted
21 horas atrás, William Marques disse:

Alguém sabe me dizer como configurar o WHMCS para me avisar por e-mail quando um cliente pagar uma fatura avulsa?

Encontrei isso, acredito que resolve sua questão. Espero que ajude!   (OBS não testei)

<?php
/**
 * WHMCS Invoice Payment Notification
 *
 * Please upload this file to your whmcs includes/hooks folder and name it ipaid.php
 * This code is free and opensource. Feel free to customize it as you need/like
 *
 * @author     HETNiX SRL <office@hetnix.com>
 * @date           17th of July 2015
 * @version    1.0.0
 * @link       https://www.hetnix.com/
 */
 
 
if (!defined("WHMCS"))
    die("This file cannot be accessed directly");
 
function ipaid_notif($vars) {
 
    $invoiceid = $vars['invoiceid'];
 
$qry1=mysql_query("SELECT * FROM tblinvoices WHERE id = $invoiceid") or die(mysql_error());
$strx=mysql_fetch_assoc($qry1);
$clidx=$strx['userid'];
$cldtls=mysql_query("SELECT * FROM tblclients WHERE id = $clidx") or die(mysql_error());
$dox=mysql_fetch_assoc($cldtls);
 
 
if ($clidx > 0) {
       
        switch ($strx['paymentmethod']) {
 
        case 'banktransfer':
                $fnpmth = "Bank Transfer Gateway";
                break;
        case 'paypal':
                $fnpmth = "PayPal Gateway";
                break;
 
 
               
        }
       
        $toj="**YOUREMAIL@MAILBOX.COM**";
        $subj="Payment received - ".$strx['total']." CURRENCY_CODE - Invoice ".$invoiceid;
        $bodj="Invoice ".$invoiceid." received a payment today of ".$strx['total']." CURRENCY_CODE\nDetails: ".$dox['firstname']." ".$dox['lastname']." paid invoice using ".$fnpmth." today.\n\nView Invoice: http://www.yourdomain.com/whmcs/admin/invoices.php?action=edit&id=".$invoiceid."\n";
        $headersj = 'From: **FROMEMAIL@MAILBOX.COM**' . "\r\n" .
    'Reply-To: **REPLYEMAIL@MAILBOX.COM**' . "\r\n" .
    'X-Mailer: PHP/' . phpversion();
        mail($toj, $subj, $bodj, $headersj);
       
}
 
}
 
add_hook("InvoicePaid",1,"ipaid_notif");
 
?>
  • **YOUREMAIL@MAILBOX.COM** – Altere par ao email que vai receber os avisos.
  • **FROMEMAIL@MAILBOX.COM** – Email que vai enviar os avisos.
  • **REPLYEMAIL@MAILBOX.COM** – Email para receber respostas (opcional).
  • CURRENCY_CODE – Use a moeda definida em seu WHMCS. Exemplo: USD, EUR, RON, GBP … etc.

Crie um arquivo chamado confirmapagamento.php e envie para includes/hooks no seu WHMCS.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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

Do you agree with our terms?