boogy Posted February 21, 2020 Share Posted February 21, 2020 Hey everyone, Guys, could you please help me with hook I want to add 1 credit to user after successful completion of the module function and user product id = 1 0 Quote Link to comment Share on other sites More sharing options...
ShaunR Posted February 25, 2020 Share Posted February 25, 2020 Just to be clear... Your wanting a hook that will add a 1.00 credit to the client account when the module create function runs? 0 Quote Link to comment Share on other sites More sharing options...
pRieStaKos Posted February 26, 2020 Share Posted February 26, 2020 On 2/21/2020 at 7:42 PM, boogy said: Hey everyone, Guys, could you please help me with hook I want to add 1 credit to user after successful completion of the module function and user product id = 1 Tell us when this would run. Check the Hook Indexes. 0 Quote Link to comment Share on other sites More sharing options...
boogy Posted February 26, 2020 Author Share Posted February 26, 2020 7 hours ago, pRieStaKos said: Tell us when this would run. Check the Hook Indexes.  19 hours ago, ShaunR said: Just to be clear... Your wanting a hook that will add a 1.00 credit to the client account when the module create function runs? Sorry for my nonclear explanation. I have two products with different payment types but with the same module. I want to add 1 credit to a client who orders a product with id 1 and module command has been finished after module provisioned. I guess it should run after hook index "AfterModuleCreate" 0 Quote Link to comment Share on other sites More sharing options...
Kian Posted February 26, 2020 Share Posted February 26, 2020 You have to use AfterModuleCreate hook point to trigger AddCredit API command. p.s. Have you considered the consequence in invoicing? You're creating money out of nothing 😕 Are you looking for troubles? 😆 0 Quote Link to comment Share on other sites More sharing options...
boogy Posted February 26, 2020 Author Share Posted February 26, 2020 (edited) 17 minutes ago, Kian said: You have to use AfterModuleCreate hook point to trigger AddCredit API command. p.s. Have you considered the consequence in invoicing? You're creating money out of nothing 😕 Are you looking for troubles? 😆 hm.. you are right. Unfortunately, it was an easier way to provide test period for a client. As I can see it now. Hook sequence should be next: I need to create two products. 1. Test product. Payment Type is Free 2. General product. Payment Type is Free Client order test product and test it, then he replenishes the account balance(add funds) with success and after that  product should be switched to the second one(general product) Edited February 26, 2020 by boogy 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.