Jump to content

Recieve SMS when you get new Order


Recommended Posts

Hi all this is very simple actually.

 

1. Go signup on http://www.clickatell.com and buy some credit and get Username/password and create http gateway (Read their Manual)

2. download this API http://www.simsonlai.org/sms_api.zip and extract Main directory of your WHMCS

3. Edit Only 3 Line according to your Account on clickatell

var $api_id = "YOUR_CLICKATELL_API_NUMBER";
var $user = "YOUR_CLICKATELL_USERNAME";
var $password = "YOUR_CLICKATELL_PASSWORD"; 

4. Open includes/checkoutscript.php

5. add this Code :

require_once ("sms_api.php");
$mysms = new sms();
echo $mysms->session;
echo $mysms->getbalance();
// $mysms->token_pay("1234567890123456"); //spend voucher with SMS credits
$mysms->send ("YOUR PHONE NUMBER", "Your Company", "Order: $domains Invoice ID: $invoiceid Product ID: $productid");

6. Save it

 

the file will look like this

Your phone number format must be Country code and full  phone number without leading Zerro and no trailling +
<?php
/*
**************************************************
************** WHMCS CheckOut Script *************
**************************************************
You may enter code here which will be run when
a user checks out if you have enabled it in
Configuration > General Configuration > Other
of your WHMCS Admin Area.  The following
variables are available to you:
**************************************************
Order ID: $orderid
Order Number: $ordernumber
Invoice ID: $invoiceid
Product ID: $productid
Domains Array: $domains
Addons Array: $addons
**************************************************
*/
require_once ("sms_api.php");
$mysms = new sms();
echo $mysms->session;
echo $mysms->getbalance();
// $mysms->token_pay("1234567890123456"); //spend voucher with SMS credits
$mysms->send ("154356465", "Your Company", "Order: $domains Invoice ID: $invoiceid Product ID: $productid");

?>

 

WARNING : Last time Do Not forget to activate Run Checkout scripts on your WHMCS

General Configration > Others > Run Script on CheckOut

 

Good Luck If you have problem just tell me

Link to comment
Share on other sites

  • Replies 55
  • Created
  • Last Reply

Top Posters In This Topic

In Indonesia Client Moslt using ATM to Make payment and confirm us,

it will be very handy if they can get Invoice Number so when they make payment VIA ATM or Money Transfer they still have on their hand Invoice number

BTW it was just and IDEA wont hurt hehehehe

Link to comment
Share on other sites

Could this be modified to alert of new support tickets?

 

..

Actually, I would LOVE to see this included in the next release. To allow people to get a account with them. Then WHMCS could sms the host of new tickets, orders etc.

 

Come on matt :) Im hell sure you will Convert ALOT of people from other billing systems :D

Link to comment
Share on other sites

Hey,

 

The above code can only be used when placing new orders!

 

 

IF you want this to work with new tickets, it can only be used if a client opens a ticket via your website. [Thats IT!]

 

 

From,

Adam

 

Yer, I thought so :)

 

I must admit, it is pretty cool though :)

 

Keep up the good work.

Link to comment
Share on other sites

  • 2 weeks later...

Hi

 

Trying to get this to work

 

Think its a problem with my checkoutscript.php file i got:

 

<?php

require_once ("sms_api.php");

$mysms = new sms();

echo $mysms->session;

echo $mysms->getbalance();

// $mysms->token_pay("1234567890123456"); //spend voucher with SMS credits

$mysms->send ("mobilenumberhere", "Your Company", "Order: $domains Invoice ID: $invoiceid Product ID: $productid");

?>

 

In the script and it is activated to run on checkout, problem is when it is activated and a order goes through it does not go to paypal (my gateway i use) its just a blank page :(

 

When i take it off it does work.

 

Running latest v of whmcs too

 

Any help would be great

 

Regards

 

Ben

Link to comment
Share on other sites

  • 2 weeks later...
you guys are nuts, why not just setup a fwd for emails that to go your order address to be fwded to your cell phone?

 

Yeah, thats what I was thinking. Why pay for an SMS service when you can just send an "email" to your phone.

Link to comment
Share on other sites

Hi guys,

seems like I need some help :) I did all as described but when clients comes to the final step in the order (step=checkout) he sees a blank page.

 

The order emails comes and the order is placed only that the customer see blank checkout page. Also SMS don't come. In which format you put the phone number next to the $mysms->send ?

 

Thanks a lot,

Strats

Link to comment
Share on other sites

Hi guys,

seems like I need some help :) I did all as described but when clients comes to the final step in the order (step=checkout) he sees a blank page.

 

Has been discussed on other threads :) You are linkely to have extar spaces/returns after the closing php tags in your checkout script, so remove them

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