payumoney_sdk 1.0.7 copy "payumoney_sdk: ^1.0.7" to clipboard
payumoney_sdk: ^1.0.7 copied to clipboard

outdated

A new Payu plugin.

example/lib/main.dart

import 'package:flutter/material.dart';

import 'package:payumoney_sdk/payumoney_sdk.dart';

void main() {
  runApp(MyApp());
}

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

class _MyAppState extends State<MyApp> {
  final payu = PayumoneySdk();

  @override
  void initState() {
    super.initState();
    startPayment();
  }

  void startPayment() async {
    final data = await payu.buildPaymentParams(
      amount: "400.0",
      transactionId: "ORDER_123",
      phone: "9999999999",
      productInfo: "Nike shoes",
      firstName: "First name",
      email: "[email protected]",
      hash: "My hash will be here",
      isProduction: false,
      userCredentials: "9999999999",
      merchantKey: "gtKFFX",
      salt: "eCwWELxi",
      merchantName: "My merchant name"
    );

    Navigator.pop(context);
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Payumoney SDK'),
        ),
        body: Center(
          child: Column(
            children: [
              SizedBox(
                height: 100,
              ),
              TextButton(
                  onPressed: () {
                    startPayment();
                  },
                  child: Text("Tap me"))
            ],
          ),
        ),
      ),
    );
  }
}
5
likes
0
points
7
downloads

Publisher

unverified uploader

Weekly Downloads

A new Payu plugin.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on payumoney_sdk

Packages that implement payumoney_sdk