Контакти | Въпроси и отговори | Общи условия | Конфиденциалност
Директна връзка с оператор
Контакти

Mobipay SMS payment

Brief service description

The Mobiopay SMS payment service allows you to receive SMS payments on your site. The service provides easy to use user interface for making SMS payment.

Unlike the Check code and Payment notification services the SMS sent by the user for making the payment is very short (1 character - Y). This approach significantly reduces the likelihood of errors when sending an SMS from the user.

Embedding Mobipay SMS payment service to your site

To embed the Mobipay SMS payment service to your site you need to include the following HTML code:

<a href="javascript:void(0)" onclick="mobipay_show()"> pay by SMS <script src="http://int.mobio.bg/smsp/embed.js.php?userData=testacc&servID=9752&theme=white&autoshow=0&mode=iframe">

Description of the parameters

  • userData is the text or number that will be included with in the HTTP request sent from Mobio.bg upon confirmation of payment by the customer;
  • servID: Fill in your servID here;
  • theme: you can choose from several design themes of the SMS payment application. Full list of available design themes can be found in the detailed review of the service menu Themes / colors;
  • mode: select a method of embedding the application - through Iframe (mode = iframe) or Pop-up window (mode = popup);
  • autoshow: if you choose embedding mode "iframe" you can specify whether the SMS payment application to be automatically displayed when the page loads (autoshow = 1) or be displayed by clicking on the link for SMS payment (autoshow = 0);
In userData parameter you can include a username or ID of the user. So when Mobio.bg sends a HTTP request to your script you will "know" for which user is payment for.

HTTP communication with the Mobio.bg server

Upon successful confirmation of payment from a client the Mobio server will make a HTTP request to the script specified in the Step 2 of the service configuration.

List of parameters that are included in the HTTP request to your script

  • userData: contains the value that was specified when embedding the SMS payment application;
  • item: contains the same value as userData. Serve only for compatibility between scripts for processing payments for the Payment notify service and the Mobipay SMS payment service;
  • message: contains the text of SMS sent by the user;
  • amount: contains the value of SMS sent without VAT (eg 4 for SMS to 4.80lv with VAT included.);
  • currency: contains code for the currency, according to ISO4217 (eg, BGN);
  • smsID: a unique ID of incoming SMS for the payment confirmation;
  • extid: contains the same value as smsID, the purpose of this parameter is only backward compatibility between scripts for processing payments for the Payment notification service and the Mobipay SMS payment service;
  • servID: contains the unique ID of the service in the Mobio.bg system;
  • tonum: contains a shortcode that is sent to SMS-a;
  • fromnum: contains the number of mobile phone that was used for sending the SMS;
  • operator: contains the identifier of the mobile operator (eg 88 for Mtel, 89 for Globul 89, 87 for Vivacom);

Sample script for processing the payments

<?php
$item = $ _REQUEST ["item"];
$userData = $ _REQUEST ["userData"];
$message = $ _REQUEST ["message"];
$amount = $ _REQUEST ["amount"];
$currency = $ _REQUEST ["currency"];
$smsID = $ _REQUEST ["smsID"];
$fromnum = $ _REQUEST ["fromnum"];
$extid = $ _REQUEST ["extid"];
$servID = $ _REQUEST ["servID"];
$tonum = $ _REQUEST ["tonum"];
$operator = $ _REQUEST ["operator"];

$mobio_remote_addrs = array ("87.120.176.216", "194.12.244.114");

if (in_array ($ _SERVER ['REMOTE_ADDR'], $ mobio_remote_addrs)) (


        / / Your script action begins
        / / Mark user as VIP, add credits ...

	echo "OK=Your payment was successful."

        / / Your script action ends

)
?>

Sending a response to the user

Upon successful call (HTTP status 200) script processing payments Mobio server will send an SMS to the user with text "Your payment was successful". You can define the text of SMS, which will be sent to the user. This is possible if your script prints the result OK=Text to send.

This is the only difference with the script for processing payments for Payment notification service, but even without using any modified script from the Payment notification service the Mobipay SMS payment service will operate normally.

Additional information

In the detailed view of the service control panel in Mobio you can see the list of all incoming and outgoing SMSs. You can also see a list of HTTP requests sent to your script and the HTTP status for each request from the link HTTP requests. From the link HTML code you can get 2 sample HTML codes for embedding the Mobipay SMS payment application in your site. All available themes / colors are shown in Themes / colors.

Други помощни текстове в тази категория:

  1. Paynotify service (HTTP GET/POST requests communictaion)
  2. SMS code service
  3. Mobipay SMS payment