Jump to content

ZoukLover

Member
  • Posts

    20
  • Joined

  • Last visited

About ZoukLover

ZoukLover's Achievements

Junior Member

Junior Member (1/3)

0

Reputation

  1. Hi all, Can anyone advise on the core below? The cron does not take the desired affect, but if I suspend/unsuspend on the products i t works. function epc_SuspendAccount(array $params) { try { $aa=suspend_imsi($params['serviceid']); if ($aa== 'success') { return 'success'; } else { $todoarray["title"] = "Service Suspension"; $todoarray["description"] = "Service ID# " . $params["serviceid"] . " requires suspension:".$aa; $todoarray["status"] = "Pending"; $todoarray["date"] = $todoarray["duedate"] = date( "Y-m-d" ); insert_query( "tbltodolist", $todoarray ); return "Service ID# " . $params["serviceid"] . " requires suspension:".$aa; } } catch (Exception $e) { // Record the error in WHMCS's module log. logModuleCall( 'epc', __FUNCTION__, $params, $e->getMessage(), $e->getTraceAsString() ); return $e->getMessage(); } return 'success'; } function epc_UnsuspendAccount(array $params) { $imsi_number=get_imsi_by_serviceid($params['serviceid']); try { $aa=unsuspend_imsi($imsi_number); if($aa== true) { return 'success'; } else { $todoarray["title"] = "Service Unsuspension"; $todoarray["description"] = "Service ID# " . $params["serviceid"] . " - IMSI ".$imsi_number." requires unsuspension"; $todoarray["status"] = "Pending"; $todoarray["date"] = $todoarray["duedate"] = date( "Y-m-d" ); insert_query( "tbltodolist", $todoarray ); return "Service ID # " . $params["serviceid"] . " - IMSI ".$imsi_number." requires unsuspension"; } } catch (Exception $e) { // Record the error in WHMCS's module log. logModuleCall( 'epc', __FUNCTION__, $params, $e->getMessage(), $e->getTraceAsString() ); return $e->getMessage(); } return 'success'; }
  2. Dear, Thanks for the reply I have removed the first query and it is working. But still not unsuspending the service as needed. I will wait for the next payment to see how it goes The automated unsuspension setting it already activated Regards
  3. Dear, After the customer pays an invoice the bank sends a txt file that I can read I have created the following code and pu ton modules/gateways/callback/module_name.php. A cron task is run every 5 minutes for this file $data = array( 'datepaid' => $fileData[0], 'status' => 'Paid', 'paymentmethod' => 'simo', 'notes' => '', ); $update = Capsule::table('tblinvoices')->where('reference_number', '=',$fileData[1])->update($data); $invoice_id = Capsule::table('tblinvoices')->where('tblinvoices.reference_number',$fileData[1])->first(); $montante_pago=$fileData[2]; $transactionId = date("Ymdhms"); addInvoicePayment($invoice_id->id,$transactionId, $montante_pago, '0', 'simo'); logTransaction('simo',array('transactionId'=>$transactionId,'amount'=>$montante_pago,'fee'=>'0','invoiceid'=>$invoice_id->id),"Successful"); The invoice is marked as paid normally and a transaction is registered. I have 2 questions? 1 - How do I avoid having duplicated transactions? I believe I need to use another transaction_id 2 - How do I unsuspend the service after checking the customer has paid all invoices from this service? Kind Regards
  4. Hi, I have have the button on the products page. But still need help no the function function imsimodule_ordem_servico() { ///// need instruction to open new window with a url } function imsimodule_AdminCustomButtonArray() { $buttonarray = array( "Ordem de Servico" => "ordem_servico", ); return $buttonarray; }
  5. Dear, Unfortunately whmcs is doing anything, even with incorrect php code It seams he is not using the files I put on includes/hooks/ What should I do?
  6. Dear, I see that we are talking about a different page. The page I refer to is https://www.your_domain.com/admin/orders.php?action=view&id=3630
  7. Hi, Did a quick replace but still nothing shows: <?php if (!defined("WHMCS")) die("This file cannot be accessed directly"); add_hook('ShoppingCartCheckoutCompletePage', 1, function($vars) { $return = []; $return[] = '<a href="https://www.whmcs.com/">WHMCS</a>'; $return[] = '<a href="https://www.enom.com/">eNom</a>'; return $return; })
  8. Dear, I need to display some content on the order page. Can someone provide any help? I have added this: includes/hooks/example.php add_hook('ViewOrderDetailsPage', 1, function($vars) { $return = []; $return[] = '<a href="https://www.whmcs.com/">WHMCS</a>'; $return[] = '<a href="https://www.enom.com/">eNom</a>'; return $return; })
  9. Dear All, We have a quite interesting project for System Integrators We need to someone do develop an API for an LTE-HSS system already working so that LTE customers are charged based on parameters specified This is a serious project, not for amateurs! Please send a PM if you are interested
  10. We need whmcs to autogenerate a PDF file for printing on some Product Groups. This is to allow the customer to sign a document as a formal commitment and also a Handover letter Can someone provide us this?
  11. Dear all, That option is already enabled. But what I get is the invoice file again, not the receipt. I need a RECEIPT, I think I was clear on that Thanks anyway
  12. Dear, Can you please be more specific? Regards
  13. Dear all, We urgently need a developer to add a Print Receipt button as well an option to send a PDF Receipt to the customer This is as legal requirement in our country
  14. Hi, I need a php coder for developing a registrar module. I have already installed jwhoisserver and is runnning well. jwhoisserver uses mysql to store domain information, including NameServers. So what I need is just to get the module to read/change/insert the information on that same database. Find below the database structure. This should be a peace of cake! CREATE TABLE IF NOT EXISTS `country` ( `country_key` int(3) unsigned NOT NULL AUTO_INCREMENT, `short` varchar(2) COLLATE utf8_unicode_ci NOT NULL, `country` varchar(255) COLLATE utf8_unicode_ci NOT NULL, PRIMARY KEY (`country_key`), UNIQUE KEY `unique_country` (`short`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=247 ; -- -------------------------------------------------------- -- -- Table structure for table `domain` -- CREATE TABLE IF NOT EXISTS `domain` ( `domain_key` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `domain` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `registered_date` datetime NOT NULL, `registerexpire_date` datetime NOT NULL, `changed` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `remarks` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `holder` bigint(20) unsigned NOT NULL, `admin_c` bigint(20) unsigned NOT NULL, `tech_c` bigint(20) unsigned NOT NULL, `zone_c` bigint(20) unsigned NOT NULL, `mntnr_fkey` bigint(20) unsigned NOT NULL, `publicviewabledata` tinyint(1) unsigned NOT NULL DEFAULT '1', `disabled` tinyint(1) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`domain_key`), UNIQUE KEY `UQ_domain_1` (`domain`), KEY `admin_c` (`admin_c`), KEY `mntnr_fkey` (`mntnr_fkey`), KEY `tech_c` (`tech_c`), KEY `zone_c` (`zone_c`), KEY `holder` (`holder`), KEY `privacyidx` (`publicviewabledata`), KEY `disabledidx` (`disabled`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=4 ; -- -------------------------------------------------------- -- -- Table structure for table `inetnum` -- CREATE TABLE IF NOT EXISTS `inetnum` ( `inetnumstart` int(10) unsigned NOT NULL, `inetnumend` int(10) unsigned NOT NULL, `bytelength` tinyint(3) unsigned NOT NULL DEFAULT '4', `netname` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `descr` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `admin_c` bigint(20) unsigned NOT NULL, `tech_c` bigint(20) unsigned NOT NULL, `source` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'LOCAL', PRIMARY KEY (`inetnumstart`,`inetnumend`,`bytelength`), UNIQUE KEY `UQ_inetnum_netname` (`netname`), KEY `admin_c` (`admin_c`), KEY `tech_c` (`tech_c`), KEY `IX_inetnum_bitlength` (`bytelength`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `mntnr` -- CREATE TABLE IF NOT EXISTS `mntnr` ( `mntnr_key` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `login` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `password` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `address` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `pcode` varchar(20) COLLATE utf8_unicode_ci NOT NULL, `city` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `country_fkey` int(3) unsigned NOT NULL DEFAULT '0', `phone` varchar(100) COLLATE utf8_unicode_ci NOT NULL, `fax` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL, `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `remarks` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `changed` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `disabled` tinyint(1) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`mntnr_key`), UNIQUE KEY `UQ_mntnr_login` (`login`), KEY `country_fkey` (`country_fkey`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=3 ; -- -------------------------------------------------------- -- -- Table structure for table `nameserver` -- CREATE TABLE IF NOT EXISTS `nameserver` ( `nameserver_key` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `nameserver` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `domain_fkey` bigint(20) unsigned NOT NULL, PRIMARY KEY (`nameserver_key`), UNIQUE KEY `UQ_nameserver` (`nameserver`), KEY `domain_fkey` (`domain_fkey`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=6 ; -- -------------------------------------------------------- -- -- Table structure for table `person` -- CREATE TABLE IF NOT EXISTS `person` ( `person_key` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `type_fkey` int(2) unsigned NOT NULL DEFAULT '0', `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `address` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `pcode` varchar(20) COLLATE utf8_unicode_ci NOT NULL, `city` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `country_fkey` int(3) unsigned NOT NULL DEFAULT '0', `phone` varchar(100) COLLATE utf8_unicode_ci NOT NULL, `fax` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL, `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `remarks` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `changed` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `mntnr_fkey` bigint(20) unsigned NOT NULL DEFAULT '0', `disabled` tinyint(1) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`person_key`), KEY `country_fkey` (`country_fkey`), KEY `mntnr_fkey` (`mntnr_fkey`), KEY `type_fkey` (`type_fkey`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=8 ; -- -------------------------------------------------------- -- -- Table structure for table `type` -- CREATE TABLE IF NOT EXISTS `type` ( `type_key` int(2) unsigned NOT NULL AUTO_INCREMENT, `type` varchar(100) COLLATE utf8_unicode_ci NOT NULL, PRIMARY KEY (`type_key`), UNIQUE KEY `unique_type` (`type`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=4 ; -- -- Constraints for dumped tables -- -- -- Constraints for table `domain` -- ALTER TABLE `domain` ADD CONSTRAINT `FK_domain_1` FOREIGN KEY (`admin_c`) REFERENCES `person` (`person_key`) ON DELETE NO ACTION ON UPDATE NO ACTION, ADD CONSTRAINT `FK_domain_mntnr` FOREIGN KEY (`mntnr_fkey`) REFERENCES `mntnr` (`mntnr_key`) ON DELETE NO ACTION ON UPDATE NO ACTION, ADD CONSTRAINT `FK_domain_person_techc` FOREIGN KEY (`tech_c`) REFERENCES `person` (`person_key`) ON DELETE NO ACTION ON UPDATE NO ACTION, ADD CONSTRAINT `FK_domain_person_zonec` FOREIGN KEY (`zone_c`) REFERENCES `person` (`person_key`) ON DELETE NO ACTION ON UPDATE NO ACTION, ADD CONSTRAINT `FK_domain_6` FOREIGN KEY (`holder`) REFERENCES `person` (`person_key`); -- -- Constraints for table `inetnum` -- ALTER TABLE `inetnum` ADD CONSTRAINT `FK_inetnum_1` FOREIGN KEY (`admin_c`) REFERENCES `person` (`person_key`), ADD CONSTRAINT `FK_inetnum_2` FOREIGN KEY (`tech_c`) REFERENCES `person` (`person_key`); -- -- Constraints for table `mntnr` -- ALTER TABLE `mntnr` ADD CONSTRAINT `FK_mntnr_country` FOREIGN KEY (`country_fkey`) REFERENCES `country` (`country_key`) ON DELETE NO ACTION ON UPDATE NO ACTION; -- -- Constraints for table `nameserver` -- ALTER TABLE `nameserver` ADD CONSTRAINT `FK_nameserver_1` FOREIGN KEY (`domain_fkey`) REFERENCES `domain` (`domain_key`); -- -- Constraints for table `person` -- ALTER TABLE `person` ADD CONSTRAINT `FK_person_country` FOREIGN KEY (`country_fkey`) REFERENCES `country` (`country_key`) ON DELETE NO ACTION ON UPDATE NO ACTION, ADD CONSTRAINT `FK_person_mntnr` FOREIGN KEY (`mntnr_fkey`) REFERENCES `mntnr` (`mntnr_key`) ON DELETE NO ACTION ON UPDATE NO ACTION, ADD CONSTRAINT `FK_person_type` FOREIGN KEY (`type_fkey`) REFERENCES `type` (`type_key`) ON DELETE NO ACTION ON UPDATE NO ACTION;
×
×
  • 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