souzadavi Posted January 16, 2019 Share Posted January 16, 2019 How to add new type (brand) of creditcard in creditcard.tpl?? 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted January 16, 2019 Share Posted January 16, 2019 23 minutes ago, souzadavi said: How to add new type (brand) of creditcard in creditcard.tpl?? I would assume that the array pulls the list from the AcceptedCardTypes field in the configuration table... editing the table wouldn't be a good idea as I imagine using the general settings tab list would overwrite any changes (I think it's a hardcoded list)... using a ClientAreaPageCreditCard hook might work to alter the array, but I don't know how WHMCS would react with a new card brand... might be worth you trying in a dev though and see what it does. 0 Quote Link to comment Share on other sites More sharing options...
souzadavi Posted January 17, 2019 Author Share Posted January 17, 2019 @brian! thank you very much to writte so quickly... I just changed in template, isn't nice, but is solved for now... Credit card brands should be inserted from admin area, much easier.... 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted January 17, 2019 Share Posted January 17, 2019 1 hour ago, souzadavi said: I just changed in template, isn't nice, but is solved for now... it never occurred to me to suggest just editing the template! 🙂 though this wouldn't have any effect on the cart, where the cc options are still being pulled from the configured options. 0 Quote Link to comment Share on other sites More sharing options...
souzadavi Posted January 21, 2019 Author Share Posted January 21, 2019 To add new credit card brands, I created a hook like @brian! said, work nicely for CIELO brands api 3.0 gateways. <?php add_hook('ClientAreaPageCreditCard', 1, function($vars) { $array = array('Visa', 'Master', 'Amex', 'Elo', 'Aura', 'JCB', 'Diners','Discover','Hipercard'); return array("acceptedcctypes" => $array); }); add_hook('ClientAreaPageCreditCardCheckout', 1, function($vars) { $array = array('Visa', 'Master', 'Amex', 'Elo', 'Aura', 'JCB', 'Diners','Discover','Hipercard'); return array("acceptedcctypes" => $array); }); thanks 🙂 2 Quote Link to comment Share on other sites More sharing options...
Patty Posted May 1, 2020 Share Posted May 1, 2020 On 1/21/2019 at 4:59 PM, souzadavi said: To add new credit card brands, I created a hook like @brian! said, work nicely for CIELO brands api 3.0 gateways. <?php add_hook('ClientAreaPageCreditCard', 1, function($vars) { $array = array('Visa', 'Master', 'Amex', 'Elo', 'Aura', 'JCB', 'Diners','Discover','Hipercard'); return array("acceptedcctypes" => $array); }); add_hook('ClientAreaPageCreditCardCheckout', 1, function($vars) { $array = array('Visa', 'Master', 'Amex', 'Elo', 'Aura', 'JCB', 'Diners','Discover','Hipercard'); return array("acceptedcctypes" => $array); }); thanks 🙂 Did you get it to work with Cielo API 3.0? I have this payment gateway but it's not accepting Hipercard. Any help with this? 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted May 1, 2020 Share Posted May 1, 2020 6 hours ago, Patty said: Did you get it to work with Cielo API 3.0? I have this payment gateway but it's not accepting Hipercard. Any help with this? @Patty - which WHMCS version are you using ? if it's a more recent one, maybe you will need to use ClientAreaPaymentMethods ? however, there is a nagging fragment of a memory that, during a recent beta period (I think v7.9 rather than v7.10), it was said by someone at WHMCS that it's not possible to add new cc types - obviously, you can't add them to the list in general settings as they're hardcoded, but I don't know whether they meant not possible at all... 1 Quote Link to comment Share on other sites More sharing options...
Patty Posted May 1, 2020 Share Posted May 1, 2020 Tks for your reply. I"m using the latest verstion. This is a functionality that should be added to the admin, or at least not be hard coded. Lots of gateways need that feature. 0 Quote Link to comment Share on other sites More sharing options...
souzadavi Posted May 2, 2020 Author Share Posted May 2, 2020 @Patty unfortunately it's not possible to add new brands. Is really bad! Other talk about it at: From credit card whmcs I didn't find a way to use other credit card brands...On database the WHMCS do not save right the credit card brand. There is some similar request for WHMCS since 2016, https://requests.whmcs.com/topic/new-credit-card-brand-and-bins WHMCS develop team is never available to talk.... I developed other CIELO API 3.0 gateway module from invoice... So there it's possible to use other credit card brands... I will send the link in PM... 0 Quote Link to comment Share on other sites More sharing options...
bellafronte Posted July 15, 2020 Share Posted July 15, 2020 @souzadavi I believe that the best way is use the sample-remote-input-gateway approach and use the _remoteinput or _remoteupdate to inject your won fields with the new credit card brands. I have some discussions about this functions and how to personalize this options on this topic: 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.