viaBowl Posted December 12, 2016 Share Posted December 12, 2016 Is there an easy way to call a client custom field in a gateway module? i've dumped globals and cant see this information anywhere? Here's what I need to do: I am writing a Coinbase gateway module and need to grab a refund address for payments which are made anonymously. This is so I can make the refund process easy within WHMCS. ANy help is appreciated. 0 Quote Link to comment Share on other sites More sharing options...
pablobaldovi Posted December 12, 2016 Share Posted December 12, 2016 Hi. You can get it from the table 'tblcustomfields' and 'tblcustomfieldsvalues' with Capsule. 0 Quote Link to comment Share on other sites More sharing options...
viaBowl Posted December 14, 2016 Author Share Posted December 14, 2016 So, using CAPSULE, as in my other thread, I could use... Use Illuminate \ Database \ Capsule \ Manager as Capsule; $Data = Capsule::table('tblcustomfieldsvalues') -> where('fieldid', '=', '2' . $Id . '%') -> get(); ...but I don't know how to format the AND statement i want to use to narrow it down to AND relid = clients-userid; - - - Updated - - - What I've done is add a custom user field for the client to specify a refund address to send bitcoin refunds to. So, the query i want, i suppose, would be: SELECT value FROM tblcustomfieldvsalues WHERE fieldid = 2 AND relid = 3; 0 Quote Link to comment Share on other sites More sharing options...
pablobaldovi Posted December 14, 2016 Share Posted December 14, 2016 All -> where() are AND If you need an OR is orWhere() $data = Capsule::table('tblcustomfieldvsalues')->where('field','=',2)->where('relid','=',3)->get(); You can check full Capsule documentation in: https://laravel.com/docs/5.2/queries 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.