flutter_theoaks_paystack_client 0.1.4 copy "flutter_theoaks_paystack_client: ^0.1.4" to clipboard
flutter_theoaks_paystack_client: ^0.1.4 copied to clipboard

Flutter Paystack payment plugin with support for Web, Android and iOS. Forked from https://github.com/djade007/flutter_paystack_client

flutter_paystack_client #

A Flutter plugin for making payments via Paystack Payment Gateway. Supports web, and mobile devices as a wrapper around https://pub.dev/packages/flutter_paystack

🚀 Installation #

To use this plugin, add flutter_paystack_client as a dependency in your pubspec.yaml file.

Then initialize the plugin preferably in the initState of your widget.

import 'package:flutter_theoaks_paystack_client/flutter_paystack_client.dart';

class _PaymentPageState extends State<PaymentPage> {
  var publicKey = '[YOUR_PAYSTACK_PUBLIC_KEY]';

  @override
  void initState() {
    PaystackClient.initialize(publicKey);
  }
}

Web #

Include the Paystack JS script in your index.html file

<script src="https://js.paystack.co/v1/inline.js"></script>

Usage #

Charge charge = Charge()
      ..amount = 10000
      ..reference = _getReference()
      ..email = 'customer@email.com';

CheckoutResponse response = await PaystackPlugin.checkout(
  context context,
  charge: charge,
);

It is recommended that when PaystackClient.checkout() returns, the payment should be verified on your backend.

1
likes
100
pub points
22%
popularity

Publisher

unverified uploader

Flutter Paystack payment plugin with support for Web, Android and iOS. Forked from https://github.com/djade007/flutter_paystack_client

Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (LICENSE)

Dependencies

flutter, flutter_theoaks_paystack, js

More

Packages that depend on flutter_theoaks_paystack_client