Jump to content
souzadavi

How to set customfields values on payment getaway configs?

Recommended Posts

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

 

 

 

 

 

 

Screenshot from 2018-05-08 17-00-31.png

Screenshot from 2018-05-08 16-58-38.png

Share this post


Link to post
Share on other sites

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
 

Share this post


Link to post
Share on other sites
29 minutes ago, souzadavi said:

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
 

Olá, Davi! como vai?

Pelo que entendi você quer listar os campos customizáveis nas configurações do módulo?

Veja o vídeo http://nimb.ws/4xwC5y e confira se é isso que necessita.

 

Share this post


Link to post
Share on other sites

YESSSS....   Olá Edvan, obrigado pelo retorno... É exatamente isso que eu preciso...

Share this post


Link to post
Share on other sites

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',
        ),

:) 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Similar Content

    • By 3245
      Hello
      i want when i post on twitter, it show post on news section at whmcs, btw i want replace twiterr posts with whmcs news
      its possible?
       
      Thanks.
    • By So, who am I ?
      Hello,
      Since updating to v7.6.1 I have an error for idn domain registration.
      I have .გე domain registration and have it defined as .xn--node in domain pricing.
      whois.json looks like this:
      { "extensions": ".xn--node", "uri": "socket://whois.itdc.ge", "available": "NO OBJECT FOUND!" } In admin- area's whois look up it works fine:

      Whois look up log sees the domain like this: xn--podi0acc.xn--node
       
       
      When I search the same domain from user side, I get this:

      Whois look up log sees the domain like this: xn--podi0acc.გე
      The value of .გე domain in select box is .xn--node
      <option value=".xn--node">.გე</option> I see that request is sent to index.php?rp=/domain/check and these are the parameters sent

      And the response is empty:

       
      I'm using Six template with standard_cart ordering form.
       
      Any help would be much appreciated!
    • By ModulesGarden
      1. DirectAdmin Extended For WHMCS 3.0
      Would you like to diversify the familiar surroundings of your DirectAdmin Extended For WHMCS a bit? We surely hope so because the 3.0 update we offer you today is intended for this very purpose.  
      The spanking new framework we have lately implemented to the module will massively streamline its overall functioning, making your everyday experience with this piece of software something of a pure pleasure. Through a complex set of technological solutions such as fully responsive design, user-friendly interface, and accelerated execution of module commands, both you and your customers will be able to handle the web hosting accounts in a more orderly fashion, and with ultimate effectiveness. 
      If that was not enough, the thoroughly rewritten code forming the product’s very foundations fits perfectly into the ever-changing WHMCS environment, keeping your company always up-to-date. 
      Learn more about DirectAdmin Extended For WHMCS 3.0!
       
      2. EasyDCIM v1.5.2 made its arrival!
      In today’s world of data theft and cyberattacks it comes as no surprise that owners of data centers seek ever more successful ways of increasing the security of their sensitive infrastructure. The recently upgraded EasyDCIM v1.5.2 delivers a solution that will finally give all administrator a peace of mind they so insistently look for. 
      The first novel function offered by this fresh update is the IMP proxy integration, allowing you to configure the servers of your data center in such a way that they will serve as proxy servers for all IPMI commands and KVM consoles. Additionally, you will be empowered to control permission details through the ACL model not only per individual users, but even entire groups of users, thus saving your time and efforts significantly. 
      Set entirely new safety standards for your company!
       
      Need Custom Software Development For Your Business?

      Get Your Free Quote Now!


      Specially for you we will adapt an application and its design to your own needs, create a new module or even a completely new system built from scratch!
    • By ModulesGarden
      1. MetricsCube Update
      Since their fairly recent start, MetricsCube team has been pulling their weight to keep further improving their innovative platform designed for professional WHMCS business analysis. 
      Speaking of progress – it has just been confirmed that their latest update is already live and ready for exploration. Equipped with a variety of noteworthy optimizations, 5 entirely new WHMCS reports, and most importantly – possibility to supervise multiple brands without the need to set up a new MetricsCube account, you will gain a whole new level of insight into the core of your company. 
      Stay always a few steps ahead the competition with new MetricsCube!
       
      2. DigitalOcean Droplets For WHMCS 1.2.0
      It is always a great feeling to share with the entire web hosting community the news of our new releases. This week is no different as we have just rolled out a fresh update of DigitalOcean Droplets For WHMCS module with some fine novel components. 
      Allow your clients to:

      Set up their own inbound and outbound firewall rules and apply them to owned Droplets Choose a different Droplet kernel from the list of the supported ones at any time Rename the initially set hostname of any virtual machine


      Feel welcome to look into the module in greater detail and give it a proper evaluation!   Learn all about DigitalOcean Droplets For WHMCS!
       
      3. Unban Center For WHMCS 2.1.0
      Everyone with this specific WHMCS module on their radar will be relieved to see that quite an extensive part of its functionalities has been tuned-up for better performance. Also, the possibility for your clients to preview the ban reason before they decide to unblock the corresponding IP address has become available. We will be happy to show you around all the remaining changes directly from the confines of our website.
      Learn all about Unban Center For WHMCS 2.1.0!
       
      Need Custom Software Development For Your Business?

      Get Your Free Quote Now!


      Specially for you we will adapt an application and its design to your own needs, create a new module or even a completely new system built from scratch!
    • By WGS
      iRedMail Reseller WHMCS Module allows your to resell email services from the iRedMail. 
      Benefits to your Clients:
      Clients can add new email address. Clients can add catch-all address. You can also manage your created email accounts like Clients can change password of account. Clients can add forward email address of web mail account. Clients can enable/disable web mail account. Clients can delete unnecessary web mail account. Admin Area Feature
      Admin can create Account Admin can suspend Account Admin can unsuspend Account Admin can terminate Account To know more about the module, visit: https://whmcsglobalservices.com/iredmail-for-whmcs/
  • Recently Browsing   0 members

    No registered users viewing this page.

×

Important Information

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