Mobile Money mobilem Payment Module for Odoo 8.0 & 9.0. Installation & Configuration User guide

Size: px
Start display at page:

Download "Mobile Money mobilem Payment Module for Odoo 8.0 & 9.0. Installation & Configuration User guide"

Transcription

1 Mobile Money mobilem Payment Module for Odoo 8.0 & 9.0 Installation & Configuration User guide Table of Contents 1.Installation...2 (1)Prerequisites...2 (2)Downloading...2 (3)Installation procedure Configuration...3 (1)Create Mobile Money Service Provider...3 (2)Create Transaction SMS Templates...3 (3)Create an Account for Connecting SMSsync Mobile SMS Gateway to Odoo...6 (4)Create a Mobile Money mobilem Payment Acquirer in Odoo SMSsync App...7 a)prerequisites...7 b)installation...7 c)configuration...8 (1)Add new Sync URL...8 (2)HTTP Method and Data Formats...9 (3)Keywords...9 (4)Enable Logs...10 Author:Bernard K Too<bernard.too@optima.co.ke> April 27, 2016 Odoo Mobile Money Mobilem Payment Module by Optima ICT 1 of 10

2 1. Installation (1) Prerequisites Before you start installing this module, make sure that the following list of modules are already installed in your Odoo server: I. Accounting & Finance Module II. Sales Management Module III. Website Sale Module IV. Jquery Validation Plugin (comes with this module) (2) Downloading This module is available in the Odoo Apps Market for Purchase and Download. The market price is 99 EUR exclusive of taxes. Taxes are known to vary depending on the region you come from. Please consult with Odoo for the amount of taxes you need to pay. Alternatively you can purchase directly from us by sending an to. Please note that no extra taxes are charged for non Kenyan buyers Once you download the module you need to extract the module in to the Odoo 'addons' directory where all other Odoo modules are located. (3) Installation procedure Go to Apps menu in Odoo 9.0 or Settings Menu in Odoo 8.0 where you can see all the Apps. On the left side of the screen you will see a link called Update Apps List. Click on this link to ensure that Odoo recognize and display the new module among the list of other Apps Search for your new module by typing the module technical name as payment_mobilem into the search bar (see screen-shot below) April 27, 2016 Odoo Mobile Money Mobilem Payment Module by Optima ICT 2 of 10

3 After successful installation, you proceed to the configuration instructions on how to setup your Mobile Money Service Provider settings as well as the SMSsync Mobile Apps settings 2. Configuration (1) Create Mobile Money Service Provider Login to your Odoo and navigate to Accounting Configuration Payments Mobile Providers Here you will create a Mobile Money Service provider e.g Airtel Enter the name, Logo and the code (optional). Note that the Logo uploaded will be displayed to your customers in the e-commerce website to easily identify this payment option. Save the changes (2) Create Transaction SMS Templates What is Transaction SMS Template? Transaction SMS template is a regular expression string used by the system to extract payment information from the transaction SMS received by Odoo ERP. Such information includes transaction number, amount paid, money sender, money receiver, balance and the date of transaction. This information will be used by Odoo ERP to validate and confirm a Sales Order. Each Mobile Money Services Provider have unique and distinct SMS templates that are used to generate transaction SMS that are usually send to the person sending money and the person receiving money. Without these templates, this module will not be able to validate any payment transaction April 27, 2016 Odoo Mobile Money Mobilem Payment Module by Optima ICT 3 of 10

4 Where do I get a sample of SMS Template? When creating one in this module, there is a default SMS template that the system will display. You can edit this template to suite your needs depending on the transaction SMS used by the Service Provider. To Test your SMS template and verify that it will work, please go to regex101.com or any other Regular Expression testing site. While on the site, choose python flavor of regex since Odoo is written in python. Copy and paste your SMS template and then also copy and past a sample SMS from your service provider and begin to match and see if the Regex(SMS template) is able to identify and match the key data in your sample SMS An example of SMS template and Sample SMS matching is shown below: If the SMS template is able to match the content in the Sample SMS without any error, then you should be able to see some matched data from the SMS similar to the one show below: April 27, 2016 Odoo Mobile Money Mobilem Payment Module by Optima ICT 4 of 10

5 Once your SMS template is matching correctly, Login to your Odoo and navigate to Accounting Configuration Payments Mobile SMS Templates Click on Create and fill in the data; copy the SMS template you have validate in regex101.com to Odoo and give it a name. Also fill in the Service Provider to which this SMS template belong Finally, you need to also tell Odoo which fields in the database table to store the matched data. As an example based on the SMS template used above in this document, the first match is the Transaction Number/Code hence the order of the DB fields should be such that the first DB field should be that of the Transaction Number/Code (see screen-shot below) NOTE: If you need help in setting up your SMS templates, Please write to us on. We shall be glad to assist you and support you once you purchase this module. Your feedback is important to us and we always welcome April 27, 2016 Odoo Mobile Money Mobilem Payment Module by Optima ICT 5 of 10

6 (3) Create an Account for Connecting SMSsync Mobile SMS Gateway to Odoo What is the Purpose of SMSsync Account in Odoo? Every SMS sent from SMSsync Mobile App or any other SMS Gateway such as Kannel to Odoo must be Authenticated, Authorized and Accounted for. This is a security feature to ensure only properly authenticated and Authorized SMS gateways can send the Transaction SMS to Odoo Note: To further enhance security of your system, We strongly recommend that you enable HTTPS in Odoo Service for encryption of data between Odoo server and SMSsync. SMSsync App Supports HTTPS traffic and you can refer to their website for further details on this topic In order to achieve this level of security, We need to setup a username, password and Authorized SMS Sender/Origin. The sender could be a Name e.g MPESA or Number e.g 8899 Login to Odoo and navigate to Accounting Configuration Payments Mobile Accounts Click on Create to enter data; fill in the username and password of your choice. Select the SMS Template to be used to process SMS received from this account. Finally, Enter the Authorized sender Name or Number. This is the same as the SMS origin number or name. The logo/image is optional Note: The username and password set above must be the same as the one set up in the SMSsync. Please refer to our SMSsync setup guide on how to setup the username and password/secret in SMSsync App (4) Create a Mobile Money mobilem Payment Acquirer in Odoo After creating a mobile money service provider, SMS templates and a mobile account, we now need to let your Odoo be aware of the new payment service called mobile Money Mobilem. This is done my creating what Odoo calls a Payment Acquirer. April 27, 2016 Odoo Mobile Money Mobilem Payment Module by Optima ICT 6 of 10

7 Login to Odoo and navigate to Accounting Configuration Payments Payment Acquirers Click on Create to enter new data; fill in the Acquirer name, select Mobile Money (mobilem) as the service, Choose the Mobile Account already created before and the Accounting Journal to use to record payments for your orders. Enter the Service Name and Service Number that your customers can see on the e-commerce website and use to send money to you while paying for their orders e.g MPESA Till Number for Service Name and for Service Number Also Pick the Currency used by your Mobile Money Service Provider. This is important as well in order to use proper exchange rate if the currency is different from your Odoo default currency Last but not least, click on Publish on Website to make it available for your e-commerce customer 2. SMSsync App Mobile Money Mobilem Payment App for Odoo works together with SMSsync App which function as the SMS getaway to forward Transaction SMS from your Smart-phone to your Odoo ERP SMSsync is a simple, yet powerful SMS to HTTP sync utility that turns any Android phone into a local SMS gateway by sending incoming messages(sms) to a configured URL (In this case your Odoo ERP). For further details about this Android App, please check the SMSsync website a) Prerequisites Android Smart-phone, any model will work Connectivity between your Smart-phone and Odoo ERP (This could be via Internet or LAN depending on where your Odoo ERP is located) b) Installation Go to Android Market Place and search for SMSsync App and download for free. You can also visit the SMSsync website and scan the QR code to download it and install in your smart-phone. The installation procedure is pretty simple and straight forward just like any other free Android App. The current stable version is v3.0.5 released on 12th February, 2016 April 27, 2016 Odoo Mobile Money Mobilem Payment Module by Optima ICT 7 of 10

8 c) Configuration (1) Add new Sync URL You can add multiple Sync URLs. Sync URLs are the HTTP URLs of your web services (URLs for your Odoo ERP in this case). This is where the messages from SMSsync are actually pushed to. Tap on the Navigation Drawer and go to Integrations Custom Web service Tap on the Add (+) Icon below the screen to create new Sync URL Note: The Sync URL should be like this: URL>/mobilem?id=<username> The username and secret must be the same as the one set in Odoo as username and Password Recommendation: For Production environment, we recommend that you enable HTTPS in your Odoo ERP to encrypt data exchanged between your ERP and the SMSsync. This will enhance security and provide privacy and protection of your Transaction SMS data. Also use strong username and passwords April 27, 2016 Odoo Mobile Money Mobilem Payment Module by Optima ICT 8 of 10

9 (2) HTTP Method and Data Formats Scroll down to the Sync Scheme section and ensure that the HTTP Method is POST and Data Format is URL Encoded. (3) Keywords Payload Keys supported by this module are the following: Key for 'secret': secret Key for 'from': from Key for 'message_id': message_id Key for 'message': message Key for 'sent_timestamp': sent_timestamp Key for 'sent_to': sent_to Key for 'device_id': device_id April 27, 2016 Odoo Mobile Money Mobilem Payment Module by Optima ICT 9 of 10

10 Tap on the Navigation Drawer and go to Filters Keywords Here you need to define the keywords that will be used by the gateway to filter incoming SMS and determine which one to be forwarded to the Sync URL already defined. The keyword you put must be able to match only the transaction SMS. So look for a keywords that is unique to the Transaction SMS from your service provider. e.g MPESA keyword for the case of Safaricom MPESA Service in Kenya. This means any SMS with keyword mpesa/mpesa will be pushed to your Odoo URL Note: Keywords are case insensitive (4) Enable Logs Tap on the Navigation Drawer and go to Logs Enable Logs Please enable Logs to monitor your SMSsync server and ensure you are able to trouble shoot with the help of the logs in case you face any issue Also ensure that you check on Odoo Logs for any errors reported by the mobilem Module such as authentication errors or HTTP data errors April 27, 2016 Odoo Mobile Money Mobilem Payment Module by Optima ICT 10 of 10