urwaypayment 1.0.9 copy "urwaypayment: ^1.0.9" to clipboard
urwaypayment: ^1.0.9 copied to clipboard

outdated

This Flutter plugin provide merchants to easy and hasslefree integration with Urway Payment gateway API's.

example/lib/main.dart

import 'dart:async';

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


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

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

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

  Future<void> makePayment() async {

    // To store payment data
    dynamic lastResult;


    try {

      // initiate payment
      lastResult = await Payment.makepaymentService(context: context,
          country: "SA",
          action: "1",
          currency: "SAR",
          amt: "1.00",
          customerEmail: "john.deo@gmail.com",
          trackid: "111AAA",
          udf1: "",
          udf2: "",
          udf3: "",
          udf4: "",
          udf5: "",
          cardToken: "",
          address: "ABC",
          city: "PQR",
          state: "XYZ",
          tokenizationType: "1",
          zipCode: "",
          tokenOperation: "A/U/D");


      print('Result in Main is $lastResult');
      
    } on PlatformException {
      print('Failed payment');
    }
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Payment Test'),
        ),
        body: Center(
            child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            Text('Waiting for Response.'),
            RaisedButton(
              child: Text('Call payment'),
              onPressed: () => makePayment(),
            )
          ],
        )),
      ),
    );
  }
}
4
likes
0
points
43
downloads

Publisher

verified publisherurway.sa

Weekly Downloads

This Flutter plugin provide merchants to easy and hasslefree integration with Urway Payment gateway API's.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

apple_pay_flutter, connectivity_plus, convert, crypto, dart_ipify, device_info_plus, email_validator, flutter, http, package_info_plus, path_provider, permission_handler, webview_flutter_plus

More

Packages that depend on urwaypayment