Tellus App

Documentation


Intro

This is a documentation for Tellus App created by Terra Founcation. Tellus App is a native Android application. No 1 Payment app For the world's unbanked. Tellus replaces cash, with fast and cheap digital payments.

Features

  • Developed with Android Studio & Gradle
  • Support for Jelly Bean (Android 4.1) and newer
  • Material design following Android Design Guidelines
  • Fast and powerful Tellus engine based on the Chromium
  • Tellus supports HTML5, JavaScript, Cookies, CSS, images, videos and other standard web tools and technologies
  • Firebase Cloud Messaging (push notifications)
  • Firebase Analytics
  • GDPR compliant (European Union’s General Data Protection Regulation)
  • Support for opening links in external browser (customizable rules)
  • Intents for opening external apps (e-mail, sms, phone call, map, store, social networks)
  • Local pages (available in offline)
  • HTML5 videos, YouTube, Vimeo, JW Player
  • Fullscreen video
  • Download manager
  • File picker for uploading files
  • Upload photo from camera
  • Geolocation (coming soon)
  • Location settings prompt
  • Navigation drawer menu with optional categories (easily customizable)
  • Action bar (optional)
  • Action bar title based on HTML title or custom text
  • Pull-to-Refresh (optional)
  • Share dialog (optional)
  • Rate my app prompt (optional)
  • Confirmation dialog when user tries to exit the app (optional)
  • Custom user agent (optional)
  • Customization (enable/disable action bar, navigation drawer menu, pull-to-refresh etc.)
  • Ten color themes (blue, brown, gray, green, lime, orange, purple, red, teal, violet)
  • Thirty menu icons
  • Progress bar when loading the page (optional)
  • Offline handling
  • Error handling
  • Responsive design (portrait, landscape, handling orientation change)
  • Support for high-resolution displays (xxxhdpi)
  • RTL
  • Multi-language support
  • Deep links
  • Runtime permissions
  • Easy configuration

Merchant Integration | Standard

Tellus-Pay Standard Payment Gateway:

  • Instructions
  • Go to Merchant
  • Click on gear button (where type is ‘Standard’. If you do not find gear icon please wait until admin approve the merchant account.)
  • Fill the input field like Item name, Order number, Price etc
  • Click on “Generate” button
  • Click on “copy” (top right corner in red color)
  • Paste it to your html file or view where you want to show the Tellus-Pay button

Merchant Integration | Express

Tellus-Pay Express Payment Gateway Documentation:

  • Payer
  • If payer wants to fund payments using Tellus-Pay, set payer to Tellus-Pay.
  • Amount
  • Specify a payment amount and the currency.
  • Transaction
  • It’s a Transaction resource where amount object has to set.
  • RedirectUrls
  • Set the urls where buyer should redirect after transaction is completed or cancelled.
  • Payment
  • It’s a payment resource where all Payer, Amount, RedirectUrls and Credentials of merchant (Client ID and Client Secret) have to set. After initialized into Payment object, need to call create method. It will generate a redirect URL. Users have to redirect into this URL to complete the transaction.
  • Installation Instruction :
  • Click download for the package download
  • Now, go to php-sdk/src/Tellus-Pay/Rest/Connection.php, then change BASE_URL value to your domain name (i.e: If the domain is - 'your-domain.com' then, define( 'BASE_URL' , 'http://your-domain.com/' ) )
  • Example :
  • require 'vendor/autoload.php';
  • //if you want to change the namespace/path from 'Tellus-Pay' - lines[1-5] - to your desired name,
  • i.e. (use Tellus-Pay\Api\Amount; to use MyDomain\Api\Amount;), then you must change the folders name that holds
  • the API classes as well as change the property 'Tellus-Pay' in (autoload->psr-0) of (php-sdk/composer.json) file to your
  • desired name and run "composer dump-autoload" command from sdk root
  • use Tellus-Pay\Api\Payer;
  • use Tellus-Pay\Api\Amount;
  • use Tellus-Pay\Api\Transaction;
  • use Tellus-Pay\Api\RedirectUrls;
  • use Tellus-Pay\Api\Payment;
  • //Payer Object
  • $payer = new Payer();
  • $payer->setPaymentMethod('Tellus-Pay'); //preferably, your system name, example - Tellus-Pay
  • //Amount Object
  • $amountIns = new Amount();
  • $amountIns->setTotal(20)->setCurrency('USD'); //must give a valid currency code and must exist in merchant wallet list
  • //Transaction Object
  • $trans = new Transaction();
  • $trans->setAmount($amountIns);
  • //RedirectUrls Object
  • $urls = new RedirectUrls();
  • $urls->setSuccessUrl('http://your-merchant-domain.com/example-success.php') //success url - the merchant domain page,
  • to redirect after successful payment, see sample example-success.php file in sdk root,
  • example - https://tellus-pay.com/Tellus-Pay_sdk/example-success.php
  • ->setCancelUrl('http://your-merchant-domain.com/'); //cancel url - the merchant domain page, to redirect after
  • cancellation of payment, example - https://tellus-pay.com/Tellus-Pay_sdk/
  • //Payment Object
  • $payment = new Payment();
  • $payment->setCredentials([ //client id & client secret, see merchants->setting(gear icon)
  • 'client_id' => 'place your client id here', //must provide correct client id of an express merchant
  • 'client_secret' => 'place your client secret here' //must provide correct client secret of an express merchant
  • ])->setRedirectUrls($urls)
  • ->setPayer($payer)
  • ->setTransaction($trans);
  • try {
  • $payment->create(); //create payment
  • header("Location: ".$payment->getApprovedUrl()); //checkout url
  • } catch (\Exception $ex) {
  • print $ex;
  • exit;
  • }
  • Optional Instructions
  • If you don't see changes after configuring and extracting SDK, go to your SDK root and run the commands below:-
  • composer clear-cache
  • composer install
  • composer dump-autoload

Project Structure

Project has the following structure (directories are marked by square braces):

  • [doc] - documentation
  • [extras] - contains extras
  • [extras]/[keystore]
  • [extras]/[keystore]/Tellusapp.jks - keystore certificate for signing APK
  • [extras]/[keystore]/Tellusapp.properties - alias and password for keystore
  • [gradle]
  • [gradle]/[wrapper] - Gradle Wrapper
  • [mobile] - main module
  • [mobile]/[libs] - contains external libraries
  • [mobile]/[src] - contains source code
  • [mobile]/[src]/[main]
  • [mobile]/[src]/[main]/[assets] - asset files (local html pages)
  • [mobile]/[src]/[main]/[java] - java sources
  • [mobile]/[src]/[main]/[res] - xml resources, drawables
  • [mobile]/[src]/[main]/AndroidManifest.xml - manifest file
  • [mobile]/build.gradle - main build script
  • [mobile]/google-services.json - configuration file for Google Services and Firebase
  • [mobile]/proguard-rules.pro - Proguard config (not used)
  • .gitignore - Gitignore file
  • build.gradle - parent build script
  • gradle.properties - build script properties containing path to keystore
  • gradlew - Gradle Wrapper (Unix)
  • gradlew.bat - Gradle Wrapper (Windows)
  • settings.gradle - build settings containing list of modules
  • utils.gradle - utilities for Gradle build script

Java packages:

  • com.robotemplates.Tellusapp - contains application class and main config class
  • com.robotemplates.Tellusapp.activity - contains activities representing screens
  • com.robotemplates.Tellusapp.ads - contains AdMob classes
  • com.robotemplates.Tellusapp.fcm - contains services for FCM
  • com.robotemplates.Tellusapp.fragment - contains fragments with main application logic
  • com.robotemplates.Tellusapp.listener - contains event listeners
  • com.robotemplates.Tellusapp.utility - contains utilities
  • com.robotemplates.Tellusapp.view - contains custom views and layouts
  • im.delight.android.Tellus - implementation of advanced Tellus component
  • name.cpr - implementation of video enabled Tellus component

Dependencies

Changelog

  • Version 1.0.0
    • Initial release
  • Version 1.1.0
    • Configuration for opening links in Tellus
  • Version 1.2.0
    • Update Gradle script to be compatible with Android Studio 1.0
    • Download manager
    • Open links directly in the Tellus by default
    • Show progress bar when loading nested link
    • Fix refreshing of the current page
    • Fix text color of the HTML select
    • Fix Google Play intent
  • Version 1.3.0
    • Material design
    • New color themes
    • New set of menu icons
    • Rules for opening links in external browser or internal Tellus
    • Support for uploading files
  • Version 1.4.0
    • Push notifications
    • Launcher icon as a mipmap
    • Fix empty placeholder
  • Version 2.0.0
    • Better Tellus performance with faster loading and caching
    • Geolocation
    • Fullscreen video
    • Better design
    • Navigation drawer menu with optional categories
    • Interstitial ads
    • Runtime permissions
    • Title and URL link of the page in share message
    • Pull-to-Refresh gesture on offline and empty screen
    • RTL
    • One config file for everything (Google Analytics, AdMob, Parse, enable/disable extra features)
    • Update SDK and libraries
    • Huge refactoring of the code with many improvements and optimizations
  • Version 2.1.0
    • OneSignal.com push notification service
    • Configuration for navigation drawer menu icon tint
  • Version 2.2.0
    • Uploading photos directly from camera
    • Rate my app prompt
    • Exit confirmation
    • Intents in the navigation menu
    • Action bar title based on HTML title
    • Download manager uses regular expressions to detect a downloadable file
    • Interstitial ad frequency counter based on URL loadings
    • Fix handling back button on video view
    • Update SDK and libraries
    • Refactoring of the code and optimizations
  • Version 2.3.0
    • Fix showing progress indicator
    • Fix key listener
    • Update SDK and libraries
    • Refactoring of the code and optimizations
  • Version 2.3.1
    • Support for Android Studio 3.0
  • Version 2.4.0
    • Firebase Cloud Messaging (push notifications)
    • Firebase Analytics
    • Show interstitial ads on local pages
    • Hide AdMob banner on error
    • GDPR compliant (European Union’s General Data Protection Regulation)
    • Deep links
    • Privacy policy link
    • Adaptive launcher icon
    • Support for Facebook, Twitter, WhatsApp URI protocols
    • User agent in the config
    • Progress placeholder in the config
    • Fix saving cookies
    • Fix downloading images
    • Fix image upload on new versions of Android
    • Update SDK and libraries
    • Refactoring of the code and optimizations
  • Version 2.5.0
    • Pull to refresh gesture modes
    • Location settings prompt

Developed by

Terra Foundation