my_fatoorah 2.4.0

Flutter Android iOS

My Fatoorah Payment SDK Integration works for android and ios

my_fatoorah #

My Fatoorah Payment SDK Integration

Getting Started #

Installation #

add this to your pubspec.yaml
my_fatoorah: any

Config #

Ios #

add this line to your Info.plist #

<key>io.flutter.embedded_views_preview</key>
<true/>

if this url is not using ssl you have to use clear text traffic . put this value in your manifest for android #

and allow arbitrary loads in your Info.plist for ios #

Android #

 <application
  ...
  android:usesCleartextTraffic="true"
  ...>
  ...
  </application>

Ios #

<key>NSAppTransportSecurity</key>
<dict>
    <key>NSAllowsArbitraryLoads</key>
    <true/>
</dict>

Usage #

import 'package:my_fatoorah/my_fatoorah.dart';
...
 MyFatoorah.startPayment(
                  context: context,
                  request: MyfatoorahRequest(
                      currencyIso: Country.SaudiArabia,
                      successUrl:
                          "Your success call back",
                      errorUrl:
                          "Your error call back",
                      invoiceAmount: 100,
                      language: ApiLanguage.Arabic,
                      token: null,
                      afterPaymentBehaviour:AfterPaymentBehaviour.None, //See the describe for this property for more details
                      ),
                );

See the example for more details

Another usage way #

import 'package:my_fatoorah/my_fatoorah.dart';
...
 MyFatoorah(
        onResult:(response){
            print(res.status);
        }
        request: MyfatoorahRequest(
                      currencyIso: Country.SaudiArabia,
                      successUrl:
                          "Your success call back",
                      errorUrl:
                          "Your error call back",
                      invoiceAmount: 100,
                      language: ApiLanguage.Arabic,
                      token: null,
                      afterPaymentBehaviour:AfterPaymentBehaviour.None, //See the describe for this property for more details
                      ),
 );

Notes #

  1. because my fatoorah sdk itself uses webview i removed all platform specified code and used webview plugin since v2
  2. after payment done the web view redirect automatically to error or success url thats mean these url has to return html content
7
likes
100
pub points
67%
popularity

My Fatoorah Payment SDK Integration works for android and ios

Repository (GitHub)
View/report issues

Documentation

API reference

Uploader

mo.ah.dawood@gmail.com

License

Apache 2.0 (LICENSE)

Dependencies

flutter, flutter_webview_plugin, http

More

Packages that depend on my_fatoorah