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

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", metadata:"" );


      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.'),
            ElevatedButton(
              child: Text('Call payment'),
              onPressed: () => makePayment(),

            ),

            ElevatedButton(
              child: Text('Call ApplePay payment'),
              onPressed: () => makePayment(),

            )
          ],
        )),
      ),
    );
  }
}
4
likes
120
points
80
downloads

Documentation

API reference

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

Apache-2.0 (license)

Dependencies

apple_pay_flutter, connectivity_plus, convert, crypto, dart_ipify, device_info_plus, flutter, http, package_info_plus, webview_flutter

More

Packages that depend on urwaypayment