Giter VIP home page Giter VIP logo

hover_ussd's Introduction

hover_ussd

build Pub Star on GitHub Flutter Website License: MIT

© image by Francis Mwakitumbula

A flutter plugin to make payments by usehover.com ussd gateway using Android Intent and receiving the transaction information back in response. android only

Getting Started

 <meta-data
        android:name="com.hover.ApiKey"  
        android:value="<YOUR_API_TOKEN>"/>

Usage

  • Example
import 'package:flutter/material.dart';

import 'package:hover_ussd/hover_ussd.dart';

void main() {
  WidgetsFlutterBinding.ensureInitialized();
  HoverUssd.initialize();
  runApp(MyApp());
}

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  final HoverUssd _hoverUssd = HoverUssd();

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Center(
          child: Row(
            children: [
              FlatButton(
                onPressed: () {
                  _hoverUssd.sendUssd(
                      actionId: "c6e45e62", extras: {"price": "4000"});
                },
                child: Text("Start Trasaction"),
              ),
              StreamBuilder(
                stream: _hoverUssd.getUssdTransactionState,
                builder: (BuildContext context, AsyncSnapshot snapshot) {
                  if (snapshot.data == TransactionState.succesfull) {
                    return Text("succesfull");
                  } else if (snapshot.data ==
                      TransactionState.actionDowaloadFailed) {
                    return Text("action download failed");
                  } else if (snapshot.data == TransactionState.failed) {
                    return Text("failed");
                  }
                  return Text("no transaction");
                },
              ),
            ],
          ),
        ),
      ),
    );
  }
}

Features

  • start a transaction
  • listen for result
  • customization
  • translation

Important

  • Production ready
  • This is a unofficial plugin

Maintainers

hover_ussd's People

Contributors

lucdotdev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

hover_ussd's Issues

Name params in methods

Il serait mieux de transformer la method ici sendUssd en avec des parametres plus parlant. par exemple
_hoverUssd.sendUssd("c6e45e62", {"price": "4000"});
soit transformer en
_hoverUssd.sendUssd(actionId:"c6e45e62", {"price": "4000"});
thanks a lot.

Name params

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

TrasactionStateFailed

TrasactionStateFailed

Hey brother thanks for this cool plugin it helps a lot, lately I was reading this package and I could not wait to test it but today I had the chance to look at it, it was very simple compared to documentation that I've red but later on after creating my api and hooking up together and onTapped my first _ussd.sendUssd I got transaction state failed but later on when I went to the useHover dashboard every thing was getting logged there perfectly I looked at my terminal there was no any strange thing that was taking place but my eyes spotted a negative sentence <unregisterNetworkCallback; CallingUid : 10197, CallingPid : 25376>, can you give me a hand on this????

image

Can't get the ussd return

Hey,

I took over this repository (V 2.0),

but I cannot recover the result of the USSD request on the interface of the application. The request is well done, the result is displayed on the Hover interface but can't get the result in the main interface of app.

How to get the response of the session?

Is'it possible to desable SMS listening ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.