Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

unofficial fortumo sms payment bindings for node.js

branch: master

Merge pull request #1 from node-migrator-bot/clean

Hi! I fixed some calls to "sys" for you!
latest commit 7fcf8b3290
Andris Reinman authored June 23, 2012
Octocat-spinner-32 example initial import September 21, 2010
Octocat-spinner-32 lib [fix] Changed require('sys') to require('util') for compatibility wit… June 23, 2012
Octocat-spinner-32 LICENSE initial import September 21, 2010
Octocat-spinner-32 README.md readme change September 21, 2010
Octocat-spinner-32 package.json initial import September 21, 2010
README.md

node-fortumo

node-fortumo is unofficial binding for the Fortumo SMS payment API. You can listen for incoming SMS messages and response to them with ease. See example/server.js for usage.

Usage

Set up the account

  • Create an account at fortumo.com
  • Set up a new Mobile Payments/Premium SMS API service here
  • Set http://yourserver.com/_incoming_sms as the receiving URL and optionally charset to UTF-8 if you want to use non-latin characters

Set up the server

  • install node-fortumo with npm install fortumo

Sample script

NB! Update service_id and secret in the script with the actual tokens of your service.

var FortumoSMSServer = require("fortumo").FortumoSMSServer;

var options = {
    service_id: "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", // public service ID
    secret:     "YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY"  // secret service token
}

var fortumo = new FortumoSMSServer(options);
fortumo.listen(80);

fortumo.on("sms", function(sms, response){
    console.log(sms); // outputs the sms data to the console
    response("received!");
});

See example/server.js for a better example

Something went wrong with that request. Please try again.