2011-01-19 69 views
0

他们是否有任何优质的解决方案向用户发送移动内容,每月收费?我想收到它,以便他们在基于网页的选择页面中输入一个数字,然后他们必须确认一个PIN来确认其订阅。我找不到任何允许美国运营商按月计费的注册商。有任何想法吗?高级短信帐单解决方案

我的应用是在PHP的API将是必要的,我想有支付去自己的手机账单(无法管理自己)

回答

5

如果你想要使用的聚合和法案客户的手机账单,您可以使用mBlox。如果您想自己开账单并只发送内容给他们,请查看Twilio(发送文本/电话)和Braintree(以处理付款)。

无论您选择什么选项,您仍然需要构建应用程序来与这些提供程序进行交互。

2

使用Fortumo服务http://fortumo.com/

下面是从他们的API示例:

<?php 

    //set true if you want to use script for billing reports 
    //first you need to enable them in your account 
    $billing_reports_enabled = false; 

    // check that the request comes from Fortumo server 
    if(!in_array($_SERVER['REMOTE_ADDR'],array('81.20.151.38', '81.20.148.122', '79.125.125.1', '209.20.83.207'))) { 
    header("HTTP/1.0 403 Forbidden"); 
    die("Error: Unknown IP"); 
    } 

    // check the signature 
    $secret = ''; // insert your secret between '' 
    if(empty($secret) || !check_signature($_GET, $secret)) { 
    header("HTTP/1.0 404 Not Found"); 
    die("Error: Invalid signature"); 
    } 

    $sender = $_GET['sender']; 
    $message = $_GET['message']; 
    $message_id = $_GET['message_id'];//unique id 
    //hint:use message_id to log your messages 
    //additional parameters: country, price, currency, operator, keyword, shortcode 
    // do something with $sender and $message 
    $reply = "Thank you $sender for sending $message"; 

    // print out the reply 
    echo($reply); 

//customize this according to your needs 
    if($billing_reports_enabled 
    && preg_match("/Failed/i", $_GET['status']) 
    && preg_match("/MT/i", $_GET['billing_type'])) { 
    // find message by $_GET['message_id'] and suspend it 
    } 


    function check_signature($params_array, $secret) { 
    ksort($params_array); 

    $str = ''; 
    foreach ($params_array as $k=>$v) { 
     if($k != 'sig') { 
     $str .= "$k=$v"; 
     } 
    } 
    $str .= $secret; 
    $signature = md5($str); 

    return ($params_array['sig'] == $signature); 
    } 
?>