Jump to content

souzadavi

Members
  • Content count

    25
  • Joined

  • Last visited

Community Reputation

10 Good

About souzadavi

  • Rank
    Member
  1. I fixed it with whmcs help, thanks guys.... the solution was: $myclientcustomfields = array(); foreach($params["clientdetails"]["customfields"] as $key => $value){ $myclientcustomfields[$value['id']] = $value['value']; } $mycustomFieldValue = $myclientcustomfields[$params['customFieldSaved']]; I really don know why the whmcs api docs say one thing and in the real world, another thing happen... but the solution to get the customfields values was this for me....
  2. I got it!! thanks for whmcs support team and programmers friends.... the solution was: I created a function: function get_customfield_id() { $fields = mysql_query("SELECT id, fieldname FROM tblcustomfields WHERE type = 'client';"); if (!$fields) { return '<br><br>Erro geral no banco de dados'; } elseif (mysql_num_rows($fields) >= 1) { $dropFieldArray = array(); $tutorial = '<br><br>Para sua comodidade, listamos abaixo os campos que podem ser usados e seus IDs. Basta pegar o ID e preencher acima. <ul>'; while ($field = mysql_fetch_assoc($fields)) { // the dropdown field type renders a select menu of options $dropFieldArray[$field['id']] = $field['fieldname']; } return $dropFieldArray; } else { return array('0' => 'nada definido'); } } and into _config() method i just give a call to this function like this: 'birthday' => array( 'FriendlyName' => 'Birthday Date', 'Type' => 'dropdown', 'Options' =>get_customfield_id(), 'Description' => 'Birthday date type the array number here', ),
  3. Hello how do I get the customfields values in gateway modules? Can I get the value of customFields by name? I did a lot of tries, but I didn't figured out... In Gateway config module I should set the ID of each customfield. Exemplo: ID Cutomer Field: 2 | Name: CPF ID Cutomer Field: 15 | Name: WhatsApp ID Cutomer Field: 19 | Name: moipCC print_r($params["clientdetails"]["customfields"]); Array ( [0] => Array ( [id] => 2 [value] => 222745448840 ) [1] => Array ( [id] => 15 [value] => 16994513223 ) [2] => Array ( [id] => 19 [value] => ) How do I get the value of ID Customer Field 15 without know the Array key. Thanks
  4. Hello? Any one??? thanks
  5. Return array creditcard payment

    The answer of the whmcs support: John KiplingStaff Merchant gateways can leverage a callback file to handle out-of-sequence payments. You can use the callback file per the example in the gateway module: https://github.com/WHMCS/sample-gateway-module/blob/master/modules/gateways/callback/gatewaymodule.php You'd just need to pass the URL to the callback file to your payment gateway in the _capture function, so that it knows to send the payment details to the callback file when required. Related documentation: https://developers.whmcs.com/payment-gateways/callbacks/ In the instances when payment is held for manual review, you might like to add a message to the invoice letting the customer know that payment has been processed but is pending review. This can be done by redirecting the client to the following URL after payment: .$CONFIG["SystemURL"].'/viewinvoice.php?id='.$invoiceid.'&pendingreview=true"
  6. YESSSS.... Olá Edvan, obrigado pelo retorno... É exatamente isso que eu preciso...
  7. No one?? function GATEWAYNAME_config() { return array( // the dropdown field type renders a select menu of options 'dropdownField' => array( 'FriendlyName' => 'Dropdown Field', 'Type' => 'dropdown',//// HOW TO SHOW CUSTOMFIELDS INTO DROPDOWNFIELD? 'Options' => $params["customfield"], 'Description' => 'Choose one', )); } HOW TO SHOW CUSTOMFIELDS INTO DROPDOWNFIELD? I would like to show a dropdownfield in config of gateway, the custom customers fields is like birthday, brazilian document numbers etc. I set it by number in a text box, is very hard, because is doubt.. I would like to bring it automatic with dropdown (select and option) at gateway config in admin. is it clear? i hope so... Thanks
  8. Hello, I'm trying to create a payment module with credit card, is almost done, I only have a doubts about the validation of payment, I need to do it on method capture or create a callback for that module? Also sometimes the credit card has another return, analyzing, or waiting, i tried to setup other status without success. Sometime the credit card need sometime to confirm the payment, so how do I setup it on capture method or callback file? Also the documentation at: https://developers.whmcs.com/payment-gateways/merchant-gateway/ show return array( 'status' => ($data->success == 1) ? 'success' : 'declined', 'rawdata' => $data, 'transid' => $data->transaction_id, 'fees' => $data->fees, ); thanks
  9. Hello I'm trying to create a gateway payment integrate with whmcs credit card default system. In Gateway payment configs (admin/configgateways.php) I would like to set an option of each customfields with dropbox than input text. check the image: https://prnt.sc/jffxs1 I need to set it on method getwayname_config() check the image: https://prnt.sc/jffyap function GATEWAYNAME_config() { return array( // the dropdown field type renders a select menu of options 'dropdownField' => array( 'FriendlyName' => 'Dropdown Field', 'Type' => 'dropdown',//// HOW TO SHOW CUSTOMFIELDS INTO DROPDOWNFIELD? 'Options' => $params["clientdetails"]["customfields"], 'Description' => 'Choose one', )); } How to populate the dropdown field on admin payment gateway config with customsfields names? any help will great!!! thanks
  10. Hello, there is anyone available to build this: https://requests.whmcs.com/topic/admin-notes I really need it... I would like to pay for the hours spend. thanks
  11. New homepage file

    I got a solution from WHMCS ticket!!! <?php use WHMCS\Database\Capsule; use WHMCS\View\Menu\Item as MenuItem; define("CLIENTAREA", true); // Set the template you want to use for the custom page BEFORE init.php is called $GLOBALS['_REQUEST']['systpl'] = 'five'; require("init.php"); // WHATEVER YOU ARE DOING IN HERE // Set the session back to the default template: $GLOBALS['_SESSION']['Template'] = 'six'; $ca->output();
  12. New Page

    Thanks for your answers!!! I got a solution from WHMCS ticket!!! <?php use WHMCS\Database\Capsule; use WHMCS\View\Menu\Item as MenuItem; define("CLIENTAREA", true); // Set the template you want to use for the custom page BEFORE init.php is called $GLOBALS['_REQUEST']['systpl'] = 'five'; require("init.php"); // WHATEVER YOU ARE DOING IN HERE // Set the session back to the default template: $GLOBALS['_SESSION']['Template'] = 'six'; $ca->output();
  13. New Page

    Thanks for your answer, much better than WHMCS support tickets, this works but is really hard to maintain, new version of WHMCS I need to do this again and again... I'm almost there using this help: https://stackoverflow.com/questions/34765796/change-whmcs-template-from-hook/34936789#34936789 But the deal is that bring back the default layout, I want to show only couple pages in other templates, because the all sites still need open the default template setting in admin general settings. I really don't understand why WHMCS support team not helping for it! thanks i will still trying to get it done!
  14. New Page

    Since 2009 I'm asking for it but no aswer at all. I've been trying ticket support, forum threads and never has a final aswer. Too boring. I want a way to create templates files without default header and footer. For now I'm using condition to hide the footer and header content. This is really bad because when WHMCS update versions I have to do all the customized settings again. So I would like to know a way to create new pages in WHMCS at other template folder. I can't use resource like: http://www.yourdomain.com/whmcs/?systpl=xxxxx because it keeped in cookie and changed the template for all site. Other way was from this resource: http://www.smarty.net/docsv2/en/template.resources.tpl#templates.from.any.dir $ca->setTemplate('file:/path/to/newdir/custom.tpl'); Then in the TPL file, you have something like this: {include file='file:/usr/local/share/templates/yourtemplate.tpl'} But didnt work.... The header and footer coming together too. I really need this because I can't create new pages easy in WHMCS system. Now i opened a request at: https://requests.whmcs.com/topic/change-template-folder-directory Thanks Davi
  15. New homepage file

    I didn't find a nice solution for it, i'm using conditions at template files, added new conditions in head.php and footer php files with smart tags.
×

Important Information

By using this site, you agree to our Terms of Use & Guidelines