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.

example/main.dart

import 'package:flutter/material.dart';
import 'package:flutter_satispay/flutter_satispay.dart';

void main() {
  Satispay.init(environment: SatispayEnvironment.production);

  runApp(const App());
}

class App extends StatelessWidget {
  const App({Key? key}) : super(key: key);

  Future<String> _createPayment() async {
    // TODO(developer): Fetch payment id from your server

    return 'TODO';
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: SatispayButton(
          onPressed: () async {
            if (!await Satispay.instance.isAvailable()) {
              ScaffoldMessenger.of(context).showSnackBar(
                const SnackBar(content: Text('Satispay is not available')),
              );

              return;
            }

            final String token = await _createPayment();

            await Satispay.instance.loadPayment(
              token: token,
              callbackUrl: 'your-custom-scheme://satispay/success',
            );
          },
        ),
      ),
    );
  }
}
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