An open API service indexing awesome lists of open source software.

https://github.com/programmerhasan/payment_dialog

A simple Flutter package for displaying customizable payment dialogs in your app.
https://github.com/programmerhasan/payment_dialog

dart flutter payment-gateway payment-integration

Last synced: 6 months ago
JSON representation

A simple Flutter package for displaying customizable payment dialogs in your app.

Awesome Lists containing this project

README

          

Payment Dialog.


A simple Flutter package for displaying customizable payment dialogs in your app.




Payment dialog for Flutter
Payment dialog for Flutter
Payment dialog for Flutter
Payment dialog for Flutter

---

## Features

- Show a payment confirmation dialog.
- Customize title, message, and buttons.

---

## Quickstart

### Add dependency to your pubspec file

Add this to your `pubspec.yaml`:

```yaml
dependencies:
payment_dialog: ^1.0.0
```

### Add PaymentDialog to your app

```dart
import 'package:flutter/material.dart';
import 'package:payment_dialog/payment_dialog.dart';

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

class MyApp extends StatelessWidget {
const MyApp({super.key});

@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
body: Center(
child: ElevatedButton(
onPressed: () async {
final success = await showPaymentDialog(
context: context,
paymentUrl: 'https://yourpaymentgateway.com/start',
succeededUrl: 'https://your-payment-website.com/success',
failedUrl: 'https://your-payment-website.com/failed',
cancelledUrl: 'https://your-payment-website.com/cancelled',
);
debugPrint(success ? "Payment Success" : "Payment Failed/Cancelled");
},
child: const Text("Pay Now"),
),
),
),
);
}
}
```