flutter_satispay 1.0.1 copy "flutter_satispay: ^1.0.1" to clipboard
flutter_satispay: ^1.0.1 copied to clipboard

discontinued
PlatformAndroidiOS

Flutter package to handle Satispay payments in your mobile apps.

Satispay

Satispay for Flutter #

pub package

Getting started #

Android #

In your AndroidManifest.xml add these queries:

<queries>
  <!-- PRODUCTION ENVIRONMENT -->
  <intent>
    <action android:name="android.intent.action.VIEW" />
    <data android:scheme="satispay" />
  </intent>
  <!-- STAGING ENVIRONMENT -->
  <intent>
    <action android:name="android.intent.action.VIEW" />
    <data android:scheme="satispay-stag" />
  </intent>
</queries>

iOS #

In your Info.plist add these LSApplicationQueriesSchemes entries:

<key>LSApplicationQueriesSchemes</key>
<array>
  <!-- PRODUCTION ENVIRONMENT -->
  <string>satispay</string>
  <!-- STAGING ENVIRONMENT -->
  <string>satispay-stag</string>
</array>

Usage #

Initialize the package #

import 'package:flutter_satispay/flutter_satispay.dart';

void main() {
  // You must run this only once
  Satispay.init(environment: SatispayEnvironment.production);

  runApp(MyApp());
}

Check if Satispay is available #

import 'package:flutter_satispay/flutter_satispay.dart';

final bool isAvailable = await Satispay.instance.isAvailable();

Redirect to the Satispay app #

import 'package:flutter_satispay/flutter_satispay.dart';

await Satispay.instance.loadPayment(
  token: 'payment_id',
  callbackUrl: 'callback_url',
);

Display the payment button #

import 'package:flutter_satispay/flutter_satispay.dart';

SatispayButton(
  onPressed: () async {
    // TODO: Check if Satispay is available

    // TODO: Create payment on your server

    // TODO: Redirect the user to the Satispay app
  },
);
0
likes
150
points
41
downloads

Publisher

verified publisherzippa.pizza

Weekly Downloads

Flutter package to handle Satispay payments in your mobile apps.

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

flutter, url_launcher

More

Packages that depend on flutter_satispay