pe_paytm 0.0.4 copy "pe_paytm: ^0.0.4" to clipboard
pe_paytm: ^0.0.4 copied to clipboard

This payment integration is with Flutter and node which will help the developer a lot in making easy payments, which used to be a problem in the past, now that the problem is solved. Because we made [...]

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:pe_paytm/order.dart';
import 'package:pe_paytm/pe_paytm.dart';

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Pe Payment Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: MyHomePage(title: 'Pe Payment Demo'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  MyHomePage({Key key, this.title}) : super(key: key);
  final String title;

  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  String phone;
  String email;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Center(
        child: Text(
          'Welcome To Pe Paytm example',
        ),
      ),
      floatingActionButton: FloatingActionButton(
        onPressed: () async {
          PePaytm pePaytm = new PePaytm(
              paymentURL:
                  'https://us-central1-payments-testing-5fc15.cloudfunctions.net/customFunctions/payment');
          await pePaytm.makePayment(context,
              order: Order(
                  orderId: DateTime.now().millisecondsSinceEpoch.toString(),
                  phoneNumber: '7777777777',
                  amount: '100',
                  custId: 'CUST123456',
                  email: 'test123@gmail.com'));
        },
        tooltip: 'Make Payment',
        child: Icon(Icons.payment),
      ), // This trailing comma makes auto-formatting nicer for build methods.
    );
  }
}
9
likes
30
pub points
0%
popularity

Publisher

unverified uploader

This payment integration is with Flutter and node which will help the developer a lot in making easy payments, which used to be a problem in the past, now that the problem is solved. Because we made it through the payment gateway of Paytm. Any developer can use easily and integrated with their project by reading the readme file.

Repository (GitHub)
View/report issues

License

MIT (LICENSE)

Dependencies

flutter, webview_flutter

More

Packages that depend on pe_paytm