stripe_plugin 0.0.6 copy "stripe_plugin: ^0.0.6" to clipboard
stripe_plugin: ^0.0.6 copied to clipboard

A new flutter plugin project.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:stripe_plugin/stripe_plugin.dart';

void main() => runApp(MyApp());

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  void initState() {
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Center(
          child: MaterialButton(
            onPressed: () async {
              try {
                var stripeId = await StripePlugin.openBasicPayment(
                  StripeReq(
                      stripeKey: "", //stripe token
                      backendBaseURL: "", // client secret full url
                      appleMerchantID: "",
                      // ephemeralKey: {}, // emphemeral response
                      orderId: "", // Order id fro client secret
                      authToken: ""),
                );
              } catch (error) {
                print(error);
              }
            },
            child: Text('payment'),
          ),
        ),
      ),
    );
  }
}
0
likes
20
pub points
0%
popularity

Publisher

unverified uploader

A new flutter plugin project.

Homepage

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on stripe_plugin