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

discontinued
PlatformAndroidiOS
outdated

Flutter package to handle Satispay payments.

Satispay

Satispay for Flutter #

pub package

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
  },
);