-
Posts
59 -
Joined
-
Last visited
-
Days Won
1
Content Type
Profiles
Forums
Events
Hotfixes
Everything posted by serverbd
-
{currency} is missed in Database table so i put {currency} in database
-
ts attempting Now but in error log .. And can i send 4 time email to the clients for (Credit Card Payment Failed) Automatic payment capture hook failed on invoice #24: Unable to retrieve current server name. Please check PHP/vhost configuration and ensure SERVER_NAME is displaying appropriately via PHP Info. But in my whmcs system PHP Info server name showing i see
-
I fixed it my self
-
Im my sms clients template i missed {currency} variable value code have 'variables' => '{firstname}, {lastname}, {duedate}, {total}, {invoiceid}, {currency}' When my user getting sms they also missing country code like USD or BDT they getting first name last name and ammount perfect but missing country code only . My hook full code blew can any one suggest what is missing or wrong in the code? <?php $hook = array( 'hook' => 'InvoiceCreated', 'function' => 'InvoiceCreatedWa', 'description' => array( 'english' => 'After Invoice Creation' ), 'type' => 'client', 'extra' => '', 'defaultmessage' => 'Hello {firstname} {lastname}, Your invoice with id {invoiceid} has been generated. Total amount is {currency} {total}. The last day of payment is {duedate}. Kindly pay your bill before due date to use services without interruption', 'variables' => '{firstname}, {lastname}, {duedate}, {total}, {invoiceid}, {currency}' ); if(!function_exists('InvoiceCreatedWa')){ function InvoiceCreatedWa($args){ $api = new wamessenger(); $template = $api->getTemplateDetails(__FUNCTION__); if($template['active'] == 0){ return null; } $settings = $api->apiSettings(); if(!$settings['api_key'] || !$settings['api_token']){ return null; } $userSql = " SELECT a.total,a.duedate,b.id as userid,b.firstname,b.lastname,b.currency,`b`.`country`,`b`.`phonenumber` as `gsmnumber` FROM `tblinvoices` as `a` JOIN tblclients as b ON b.id = a.userid WHERE a.id = '".$args['invoiceid']."' LIMIT 1 "; $result = mysql_query($userSql); $num_rows = mysql_num_rows($result); if($num_rows == 1){ $UserInformation = mysql_fetch_assoc($result); $currency_sql=mysql_query('SELECT code FROM tblcurrencies WHERE id='.$UserInformation['currency']); $replace_currency=""; if(mysql_num_rows($currency_sql) > 0){ $currency_result=mysql_fetch_assoc($currency_sql); $replace_currency=$currency_result['code']; } $template['variables'] = str_replace(" ","",$template['variables']); $replacefrom = explode(",",$template['variables']); $replaceto = array($UserInformation['firstname'],$UserInformation['lastname'],$api->changeDateFormat($UserInformation['duedate']),$UserInformation['total'],$args['invoiceid'],$replace_currency); $message = str_replace($replacefrom,$replaceto,$template['template']); $api->setCountryCode($UserInformation['country']); $api->setGsmnumber($UserInformation['gsmnumber']); $api->setMessage($message); $api->setUserid($UserInformation['userid']); $api->send(); } } } return $hook;
-
Suppose I have 2 currency 1. USD 2. BDT When Clients signup Additional Information Choose Currency its No1 position USD but Can I set BDT in No1 position? I men 1st item currency BDT instead of USD with some Hook ?
-
It can be help for you, Im not sure https://marketplace.whmcs.com/product/4637-wra-restful-api-addon-for-whmcs
-
How can I send custom message to specific client from WHMCS local API ? Custom Module : After AddTransaction via api I want instant send mail to my client , I have user = 10 Mail Subject = Confirmation of Receipt of USD 5.62 Mail Body = Thanks you for Add Credit USD 5.62 I try blew no luck $command = 'SendEmail'; $postData = array( 'id' => '10', 'customsubject' => 'Confirmation of Receipt of USD 5.62', 'custommessage' => 'Thanks you for Add Credit USD 5.62', 'customvars' => base64_encode(serialize(array("custommerge"=>$populatedvar1, "custommerge2"=>$populatedvar2))), ); $adminUsername = 'admin'; $results = localAPI($command, $postData, $adminUsername);
-
In WHMCS Module/addons, Can I get Clients ID from Specific Custom field value ? ============== I have a unique customer filed auto crete when client register . In my admin dash when I search with that customer field I can find the exact customer well. ($customfield['fieldname'] == "CLIENTCODE") this custom field Value example = KAMA01 In my module I have a variable $ref = KAMA01 now in this module I need clients ID .. Can I get clients ID from that $ref variable ?
-
If you want show price in non whmcs you can use Data Feeds https://docs.whmcs.com/Data_Feeds
-
Mail Provider GOOGLE as SMTP Dam Slow (5+ Minute).
serverbd replied to serverbd's topic in Troubleshooting Issues
When I trying to ping google smtp from my server its return IPV6 instead of IP address .. is this can be any issue ? ping smtp.gmail.com PING smtp.gmail.com(eg-in-x6c.1e100.net (2a00:1450:4013:c05::6c)) 56 data bytes also.. telnet smtp.gmail.com 587 Trying 2a00:1450:4013:c05::6d... Trying 173.194.79.108... Connected to smtp.gmail.com. Escape character is '^]'. 220 smtp.gmail.com ESMTP 90sm6727210edc.36 - gsmtp 451 4.4.2 Timeout - closing connection. 90sm6727210edc.36 - gsmtp Connection closed by foreign host. root@abc:~# telnet smtp.gmail.com 465 Trying 2a00:1450:4013:c00::6c... Trying 108.177.119.108... Connected to smtp.gmail.com. Escape character is '^]'. Connection closed by foreign host. -
Mail Provider GOOGLE as SMTP Dam Slow (5+ Minute).
serverbd replied to serverbd's topic in Troubleshooting Issues
I try lots of device and browser all email provider ok but when set G suite with 0auth SMTP site all mail and mail related activity gone hang down.. when I go any client profile and send a mail it take 5+ minute to realise.. Do you using G suite SMTP as WHMCS email provider ? I other user feedback who using G suite SMTP as WHMCS email provider.
