Jump to content

Execute shell script after paid order


sboselli

Recommended Posts

I need to execute a shell script to create some custom users and files after an order´s been paid through Paypal.

 

I use the Single page templates.

 

From what i´ve found in searches i would need to use checkoutscript.php, but in the setup i got from my VPS there is no includes/checkoutscript.php or anywhere else either...

 

If so, how would i go about doing it?

 

Thanks,

 

Santiago.

Link to comment
Share on other sites

  • 2 weeks later...

You could also use the action hooks in WHMCS

Add your code to the actionhook_AfterModuleCreate function in /includes/actionhooks.php file

 

All hooks available are:

 

# This function runs when the user checks out using the shopping cart

actionhook_ShoppingCartCheckout

# This function runs when a new client is added

actionhook_ClientSignup

# This function runs when a change is made to clients details - name, address, email, password, etc...

actionhook_ClientDetailsEdit

# This function runs when a client logs in

actionhook_ClientLogin

# This function runs when a client logs out

actionhook_ClientLogout

# This function runs when a client is deleted

actionhook_ClientDelete

# This function runs when an invoice is fully paid and therefore the services renewed

actionhook_InvoicePaid

# This function runs when a ticket is opened

actionhook_TicketOpen

# This function runs when a ticket is replies to by a client or admin user

actionhook_TicketReply

# This function runs when a module creation command completes successfully - various variables available

actionhook_AfterModuleCreate

# This function runs when a module suspension command completes successfully - various variables available

actionhook_AfterModuleSuspend

# This function runs when a module unsuspension command completes successfully - various variables available

actionhook_AfterModuleUnsuspend

# This function runs when a module terminate command completes successfully - various variables available

actionhook_AfterModuleTerminate

# This function runs prior to checkout processing to allow for manipulation of cart session data

actionhook_PreShoppingCartCheckout

 

Hope that helps

Link to comment
Share on other sites

  • 7 months later...

Hi -

 

Zorro, did you ever get this working?

 

For the life of me, I'm having trouble making these action hooks actually do anything - specifically:

 

actionhook_AfterModuleCreate

actionhook_AfterModuleSuspend

actionhook_AfterModuleUnsuspend

actionhook_AfterModuleTerminate

 

I've written really big elaborate code and functions, to simply doing a print_r($data), to exec()'ing a touch on some file in /tmp - I just can't get them to execute.

 

Anyone have any tips on this? Had any problems in the past? If so, what did you do about it?

 

Thanks!

-dant

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated