madRooster Posted July 16, 2016 Share Posted July 16, 2016 I am hoping I am missing a setting somewhere and just cant find it or someone can recommend a good hook to use the API. We are coming from AWBS and one feature it had was the ability to add a fee to an invoice if credit card attempt failed automatically. As we are charged $0.30 for every charge attempt, it allowed us to add a $0.50 charge to every single time the credit card failed. Sometimes adding multiple $0.50 charges to one invoice. I cant believe a billing system such as AWBS had this ability and was stopped being developed years ago and WHMCS does not have this function. Any ideas on how to implement if it doest have this ability? 0 Quote Link to comment Share on other sites More sharing options...
twhiting9275 Posted July 16, 2016 Share Posted July 16, 2016 The closest hook I could find would be LogTransaction but that doesn't really appear to be exactly what you're after here. You might want to implement this directly into the card module itself. Which processor are you using? 0 Quote Link to comment Share on other sites More sharing options...
madRooster Posted July 18, 2016 Author Share Posted July 18, 2016 We are using PayPal Pro. I have not looked to see if WHMCS has encrypted that module yet or not. Was really looking for a way to do this without having to hack a default file and use a hook, so upgrades would be easier. 0 Quote Link to comment Share on other sites More sharing options...
twhiting9275 Posted July 18, 2016 Share Posted July 18, 2016 If it's a module from WHMCS, then it'll be encrypted. Unfortunately, the closest hook point would be the one I mentioned. You could use something like API::Update Invoice based on the result value of that, though I'm not sure what the expected result values would be, you'd have to run that by support 0 Quote Link to comment Share on other sites More sharing options...
madRooster Posted July 18, 2016 Author Share Posted July 18, 2016 I just looked and the PayPal Pro module is encrypted, so unless I want to re-write it, this is not a direct option. I still can not believe this is not an standard option by WHMCS. It seems all the other billing solutions have it as well I mentioned, AWBS had it for years. I have found old invoices that had it back to 2005 that have this fee. 0 Quote Link to comment Share on other sites More sharing options...
twhiting9275 Posted July 18, 2016 Share Posted July 18, 2016 I would tend to agree a bit here. This absolutely should be added in, however, being as a trivial fee (usually < .50) that's not handed off that often, I can see why not. Maybe time to put in a request 0 Quote Link to comment Share on other sites More sharing options...
madRooster Posted July 19, 2016 Author Share Posted July 19, 2016 That trivial fee generates $1000s of extra of income for us each year, as we make $0.20 on each one. Some accounts get 3-4 $0.50 charges before the clients fix their credit card and pays. So its not a trivial thing to us. I have our web developer working on a hook using the transaction log and they say it appears doable. 0 Quote Link to comment Share on other sites More sharing options...
madRooster Posted July 19, 2016 Author Share Posted July 19, 2016 Ok, the web development team was able to whip this up and it works just fine using the TransactionLog hook. The only issue we have with it is it charges the fee to new signups as well if their card gets declined. Our previous system did only did it on automatic payments, but this is ok, we will just update our TOS and documentation to reflect the new change. 0 Quote Link to comment Share on other sites More sharing options...
twhiting9275 Posted July 19, 2016 Share Posted July 19, 2016 That's easily solved In your hook, wrap the part where you add the fee like so: $uid = $_SESSION['uid']; if (!isset($uid)) { insertfunctiontochargeinvoicesifcardisdeclined(); } The downside to that method is that only customers who have declines via cron will pay that fee . Or, like you said, you can simply edit your TOS 0 Quote Link to comment Share on other sites More sharing options...
madRooster Posted July 21, 2016 Author Share Posted July 21, 2016 That's easily solvedIn your hook, wrap the part where you add the fee like so: $uid = $_SESSION['uid']; if (!isset($uid)) { insertfunctiontochargeinvoicesifcardisdeclined(); } The downside to that method is that only customers who have declines via cron will pay that fee . Or, like you said, you can simply edit your TOS Good Call. With the manual migration to WHMCS, our brains are over worked right now. 0 Quote Link to comment Share on other sites More sharing options...
twhiting9275 Posted July 21, 2016 Share Posted July 21, 2016 I can imagine. There's a ton of work to be done 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.