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

outdated

Add Stripe to your Flutter Application to Accept Card Payments Using Payment Intents with Strong SCA 3DS Compliance

example/lib/main.dart

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

import 'package:flutter/services.dart';
import 'package:flutter_stripe_payment/flutter_stripe_payment.dart';

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

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

class _MyAppState extends State<MyApp> {
  String _paymentMethodId;

  @override
  void initState() {
    super.initState();
    FlutterStripePayment.setStripeSettings("{STRIPE_PUBLISHABLE_KEY}","{STRIPE_APPLE_PAY_MERCHANTID}");
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Stripe App Example'),
        ),
        body: Center(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: <Widget>[
            _paymentMethodId != null ? Text("Payment Method Returned is $_paymentMethodId", textAlign: TextAlign.center,) : Container(),
            RaisedButton(child: Text("Add Card"), onPressed: () async{
              var paymentResponse = await FlutterStripePayment.addPaymentMethod();
              setState(() {
                _paymentMethodId = paymentResponse.paymentMethodId;
              });
            },)
          ],),
        ),
      ),
    );
  }
}
55
likes
0
pub points
81%
popularity

Publisher

verified publisherdormmom.com

Add Stripe to your Flutter Application to Accept Card Payments Using Payment Intents with Strong SCA 3DS Compliance

Homepage
Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on flutter_stripe_payment