0 purchases
uddoktapay
UddoktaPay Payment Gateway Flutter Package By Programming Wormhole
This is a Flutter package for UddoktaPay Payment Gateway. This package can be used in flutter project. Programming Wormhole was created this package while working for a project and thought to release for all so that it helps.
⚠️ Please note that, you have to contact with UddoktaPay sales team for any kind of dev or production access keys. We don't provide any test account or access keys or don't contact us for such.
Check the package in github and also available in flutter/dart package
How to use: #
Depend on it, Run this command With Flutter:
$ flutter pub add uddoktapay
copied to clipboard
This will add a line like this to your package's pubspec.yaml (and run an implicit flutter pub get):
dependencies:
uddoktapay: ^0.0.3
copied to clipboard
Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more. Import it, Now in your Dart code, you can use:
import 'package:uddoktapay/uddoktapay.dart';
import 'package:uddoktapay/models/customer_model.dart';
copied to clipboard
Features #
Pay using UddoktaPay
Usage #
Official Link for API documentation and demo checkout
UddoktaPay API Documentation
Make a Payment #
Sandbox
UddoktaPay.createPayment(
context: context,
customer: CustomerDetails(
fullName: 'Programming Wormhole',
email: '[email protected]',
),
amount: '50',
);
copied to clipboard
Production
UddoktaPay.createPayment(
context: context,
customer: CustomerDetails(
fullName: 'Programming Wormhole',
email: '[email protected]',
),
amount: '50',
credentials: UddoktapayCredentials(
apiKey: 'api_key',
panelURL: 'https://pay.domain.com',
),
)
copied to clipboard
Make sure to replace the provided credentials with your own UddoktaPay production credentials.
Response
final response = await UddoktaPay.createPayment(
....
....
)
copied to clipboard
Response Sample
RequestResponse(
fullName: "Programming Wormhole",
email: "[email protected]",
amount: "50.00","fee":"0.00",
chargedAmount: "50.00",
invoiceId: "a19Aun0gPxIqBVjnCfpL",
paymentMethod: "bkash",
senderNumber: "675675656765",
transactionId: "FGHGFHJGHG",
date: "2024-04-09 12:01:28",
status: ResponseStatus.completed,
);
copied to clipboard
Error Handling #
The methods mentioned above may throw a status. You can catch and handle the status using a if-else block:
if (response.status == ResponseStatus.completed) {
// handle on complete
}
if (response.status == ResponseStatus.canceled) {
// handle on cancel
}
if (response.status == ResponseStatus.pending) {
// handle on pending
}
copied to clipboard
Examples for see the /example folder.
Here is the example code link
Example Video Demo
Importance Notes #
Read the comments in the example of code
See the documents UddoktaPay API Documentation
Contributing #
Core Maintainer
Md Shirajul Islam
Contributions to the uddoktapay package are welcome. Please note the following guidelines before submitting your pull request.
Follow Effective Dart: Style coding standards.
Read UddoktaPay API documentations first.Please contact with UddoktaPay for their api documentation and sandbox access.
License #
Uddoktapay package is licensed under the BSD 3-Clause License.
Copyright 2024 Programming Wormhole. We are not affiliated with UddoktaPay and don't give any guarantee.
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.