Jump to content

actionhook problem


seeker2921

Recommended Posts

Hello,

 

I'm trying to WHMCS sent a SMS via email once an order is placed. I added php to the actionhooks and tried to place an order. at the very end when you click complete order it goes to a blank page. I'm assuming my code is wrong or I didnt set it up correctly. below is the code I used. any help would be great. Thanks.

 

 

function actionhook_ShoppingCartCheckout($vars) {

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

# $vars["OrderID"] - Order ID Number

# $vars["OrderNumber"] - 10 Digit Order Number

# $vars["InvoiceID"] - Invoice ID Number

# $vars["Products"] - Array of Product IDs from Order

# $vars["Addons"] - Array of Addon IDs from Order

# $vars["Domains"] - Array of Domain IDs from Order

$Name = "SMS";
$email = "sms@tester.com"; 
$recipient = "015117543065@t-mobile-sms.de"; 
$mail_body = "New Order Submited!";
$subject = "order";
$header = "From: ". $Name . " <" . $email . ">\r\n";

mail($recipient, $subject, $mail_body, $header);




}

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