Way2sms module is an integration with rules module which provides free SMS service to users (in India) using way2sms API.

This module uses an unofficial way2sms API (https://github.com/kingster/Way2SMS-API) in which it requires a sender's phone number which should be registered at way2sms (http://site24.way2sms.com/). Those credentials are used to trigger the API. The receiver's phone number (may not be registered at way2sms) and message is configurable via action data selector and can be used as per the requirements.

Need of this module :

Way2SMS module provides send sms action which can be integrated with any of the event using rules UI. Hence integration of Way2SMS with Rules enhances drupal functionality a lot, as one can even get notified if a comment is posted or on account creation or publishing of the node or any such event. The Way2SMS API only requires four parameters i.e sender’s phone number, sender’s password, receiver's phone number and message. Sender’s phone number should be registered on http://site24.way2sms.com/ so that free SMS service could be provided and the password to login on way2sms becomes sender’s password.

Configurable options provided with this module:

  • Sender’s Phone Number and Password: Register on http://site24.way2sms.com/ to obtain login credentials (i.e. Sender’s Phone Number and Password). Admin needs to provide this correct credentials on the module's configuration page at admin/config/services/way2sms.
  • Rules Action : Send SMS (available under way2sms, after module is enabled) requires two parameters i.e. Receiver's phone number and configurable custom message. This Send SMS action can be called with any Events such as node save, comment etc.

Example Scenario :
A simple scenario for the use of this module can be thought of as notifying user account creation via sms. In that case, after installation and proper configuration of the module we would have to create a rule on the event of user account creation and then add “Send SMS” action. Now, in this case we need a source field for contact number of user which we can create as user field. And that field can be selected using data selector under action’s configuration. Then simply adding message to the second configuration option of “Send SMS” action. That’s all we need and we are good to go with.
user account image :

Send SMS action image :
Send SMS action

Similar projects / Requirement details

  • Send SMS : Module allows user to send sms to different phone numbers or users from our site (if they entered their phone number in their profile). This is dependent on Send email module which is an API module for sending SMS messages via email gateways. However, this module is not available in Drupal 7, Drupal 6.
  • SMS Framework : The SMS Framework is a set of modules that enables interaction between mobile users and Drupal using SMS. The included API allows developers to add develop support for third party gateways. The API also allows other modules to implement SMS features. Free SMS service is not provided here.
  • No free SMS service : Click Here!!.

Two basic differences is that way2SMS provides FREE SMS Service, the use case is extended due to its integration with Rules module.

Sandbox Project Link :https://www.drupal.org/sandbox/kajalkiran/2839901

Git Clone Command git clone --branch 7.x-1.x https://git.drupal.org/sandbox/kajalkiran/2839901.git way2smscd way2sms

Manual reviews of other projects

Comments

kajalkiran created an issue. See original summary.

kajalkiran’s picture

Issue summary: View changes
kajalkiran’s picture

Issue summary: View changes
kajalkiran’s picture

Issue summary: View changes
kajalkiran’s picture

Issue summary: View changes
StatusFileSize
new78.1 KB
PA robot’s picture

Status: Needs review » Needs work

Git clone command for the sandbox is missing in the issue summary, please add it.

We are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)

Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).

I'm a robot and this is an automated message from Project Applications Scraper.

kajalkiran’s picture

Issue summary: View changes
kajalkiran’s picture

Issue summary: View changes
kajalkiran’s picture

Issue summary: View changes
kajalkiran’s picture

Issue summary: View changes
kajalkiran’s picture

Status: Needs work » Needs review
purushotam.rai’s picture

Issue tags: +PAreview: review bonus
navneet0693’s picture

Status: Needs review » Needs work

Automated Review:

Review of the 7.x-1.x branch (commit 6f24cee):

  • No automated test cases were found, did you consider writing Simpletests or PHPUnit tests? This is not a requirement but encouraged for professional software development.

This automated report was generated with PAReview.sh, your friendly project application review script. You can also use the online version to check your project. You have to get a review bonus to get a review from me.

Link to automated review results can be found here

Manual Review:

  1. Dependencies should be namespaced to the project they are part of, in the format: dependencies[] = {project}:{module}
  2. You can also add a hook_install which might simply display a note confirming that the module is installed or you can provide link to configuration page. See here.
  3. Defining "package" isn't good as it is a single module. See here.
  4. It is good to use tag reference content.
  5. A very little small typo is there: 'group' => t('Wasy2SMS') should be 'group' => t('Way2SMS')
  6. It is recommended to add a watchdog message if sms has been successfully sent.

Negative Test Case

Receiver Phone number is text or token of rules

drupal_set_message(t("Invalid Contact Number: @num", ['@num' => $contact_number]), 'error');
will return number. I think it should be more smart in this case.

SMS is still being sent (not actually)

$reciever_contact_field = _way2sms_preprocess_contact_field($reciever_contact_field);
Actually, after this line: $reciever_contact_field = FALSE and this $result = $client->send($reciever_contact_field, $message); won't check if the $reciever_contact_field is a number or not.

kajalkiran’s picture

Hi @navneet0693,

Thank you so much for your valuable time and effort for reviewing this project. Your valuable comment will help improving this project. Changes have been made as per the comment mentioned by you.

  • Dependencies should be namespaced to the project they are part of, in the format: dependencies[] = {project}:{module} - Fixed
  • Added hook_install which simply displays a note confirming that the module is installed and link to configuration page. - Fixed
  • Defining "package" isn't good as it is a single module. - Fixed
  • It is good to use tag reference content - Added tag references - Fixed
  • Thanks for pointing out typo. It was a very small but over looked error - Fixed

Handled negative test cases :

  • Invalid Receiver Phone number now displays the actual receiver's value set/passed to the function gets displayed by use of drupal_set_message
  • Watchdog message set on when message is not sent.
kajalkiran’s picture

Status: Needs work » Needs review
navneet0693’s picture

@kajalkiran

It is recommended to add a watchdog message if sms has been successfully sent.

It's a good thing to let the user/admin know whether the message has been successfully sent :) I am not sure, but we already has error messages in place for

Watchdog message set on when message is not sent.

This is not that necessary, but it's good, so I am not changing the status to needs work. I am reviewing it again.

kajalkiran’s picture

Hi @navneet,

I have some future plans related to your recommendation added. This would be handled in different way. Thank you for you suggestions and time we would consider such recommendations :)

navneet0693’s picture

Status: Needs review » Reviewed & tested by the community

So, finally it works good as of now ! We can add certain features later on. Issuing RTBC. :)
@kajalkiran Nice work !! Having a rules integration is awesome!

kajalkiran’s picture

Thank you @navneet.

navneet0693’s picture

Status: Reviewed & tested by the community » Needs review

I am changing status to Needs Review, let it be reviewed by few more people ;)

klausi’s picture

Status: Needs review » Fixed

manual review:

  1. project page: could you add the differences to other projects to your project page also?
  2. _way2sms_send(): @return should have the data type after it, see https://www.drupal.org/docs/develop/coding-standards/api-documentation-a...
  3. _way2sms_send(): the watchdog() logs could be more helpful with using placeholders for the error returned in the result or for the message or the phone number.
  4. _way2sms_login(): the function_exists() call is not necessary here. You depend on the libraries module, which muss be enabled before your module is enabled.
  5. way2sms_rules_action_info(): The "$" in the parameter names for the Rules action should be removed, parameter names should only contain a-z letter and under scores.

Otherwise looks good to me.

Thanks for your contribution, Kajal!

I updated your account so you can promote this to a full project and also create new projects as either a sandbox or a "full" project.

Here are some recommended readings to help with excellent maintainership:

You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and stay involved!

Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.

Thanks to the dedicated reviewer(s) as well.

kajalkiran’s picture

Thank you so much @klausi. Will make the changes as per your suggestions.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.