flutter_telebirr 0.0.4 copy "flutter_telebirr: ^0.0.4" to clipboard
flutter_telebirr: ^0.0.4 copied to clipboard

unofficial telebirr flutter sdk to make telebirr sdk payment for flutter

telebirr Flutter SDK #

telebirr Flutter sdk for telebirr payment API.

pub package

Features #

  • Get toPayUrl from telebirr using telebirr sdk api

Getting Started #

In order to use this plugin you need these keys from telebirr #

  • appId
  • appKey
  • publicKey
  • test url //for test mode

To use this plugin add 'flutter_telebirr' as dependency in your pubspec.yaml file. For example:

dependencies:
  flutter_telebirr: ^0.0.4
copied to clipboard

To allow your application to access telebirr api on the Internet,

👉 Android #

add the following permission to your AndroidManifest.xml file:

    <uses-permission android:name="android.permission.INTERNET"/>

copied to clipboard

In order to use telebirr test urls

👉 Android #

add the following attribute to the application element:

    <application ... android:usesCleartextTraffic="true">
copied to clipboard

👉 IOS #

add the following to your Info.plist file:

<key>NSAppTransportSecurity</key>
<dict>
    <key>NSAllowsArbitraryLoads</key>
    <true/>
</dict>
copied to clipboard

How to use #

  1. Configure

If you set test mode you need to pass testUrl provided by telebirr

Ps. Don't include /toTradeSDKPay at the end of test url, instead use this format 'http://<IP>:<PORT>/service-openup'

    TelebirrPayment.instance.configure(
      publicKey: publicKey,
      appId: '<appId>',
      appKey: "<appKey>",
      notifyUrl: "https://localhost/notifyUrl",
      shortCode: "<shortCode>",
      merchantDisplayName: "Organization name",
      // mode: Mode.test,
      // testUrl: 'http://<IP>:<PORT>/service-openup',
    );
copied to clipboard
  1. call startPayment and pass itemName and totalAmount
...
    final response = await TelebirrPayment.instance.startPayment(
      itemName: "Goods name",
      totalAmount: "10",
    );
copied to clipboard
  1. If you get successful response you can load toPayUrl with any url loader package.
...
    var toPayUrl = '';
    if(response !=null && response!.isSuccess){
      toPayUrl = response.data?.toPayUrl ?? '';
    }
copied to clipboard
5
likes
160
points
35
downloads

Publisher

unverified uploader

Weekly Downloads

2024.06.22 - 2025.01.04

unofficial telebirr flutter sdk to make telebirr sdk payment for flutter

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

basic_utils, convert, crypto, encrypt, flutter, http, pointycastle

More

Packages that depend on flutter_telebirr