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
140
pub points
46%
popularity

Publisher

verified publisherzippa.pizza

Flutter package to handle Satispay payments in your mobile apps.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter, url_launcher

More

Packages that depend on flutter_satispay