uni_payments

Creator: coderz1093

Last updated:

0 purchases

uni_payments Image
uni_payments Images
Add to Cart

Description:

uni payments

Uni Payments offers seamless integration for multiple payment gateways including Razorpay, Flutterwave, Google Pay, Paytm, Paystack, and PayPal ensuring a fast, easy and secure transaction process.





Getting Started #


Add this to your pubspec.yaml
dependencies:
uni_payments: <latest_version>
copied to clipboard


Get the package from Pub:
flutter pub get
copied to clipboard


Import it in your file
import 'package:uni_payments/uni_payments.dart';
copied to clipboard


Usage #

Check out the complete example with integration and declarations uni_payments_example

Razorpay #
await UniPayments.razorPayPayment(
razorpayKey: "add_razopay_key",
contactNumber: "1234567890",
emailId: "add_email_id",
amount: 2500,
userName: "uni_payments",
colorCode: '#fcba03',
description: 'Add the description for the order or payment.',
successListener: (UniPaymentResponse uniPaymentResponse) {
/// here manage code for success payment.
bool isSuccessPayment = uniPaymentResponse.paymentStatus;
if (isSuccessPayment) {
log(uniPaymentResponse.message);
log(uniPaymentResponse.paymentId);
}
},
failureListener: (UniPaymentResponse uniPaymentResponse) {
/// here manage code for failure or error in payment.
bool isFailedPayment = uniPaymentResponse.paymentStatus;
if (isFailedPayment) {
log(uniPaymentResponse.message);
log(uniPaymentResponse.paymentId);
}
},
);
copied to clipboard
Paystack #
UniPaymentResponse uniPaymentResponse = await UniPayments.payStackPayment(
context: context,
emailId: "[email protected]",
payStackKey: 'enter_paystack_key',
amount: 2500,
uniqueRefrenceID: 'enter_unique_transaction_key',
callbackUrl: 'callback_url_for_transaction_response',
);
copied to clipboard
Paytm #
await UniPayments.paytmPayment(
/// Login to "dashboard.paytm.com" with your Paytm account details & Get Merchant Id.
paytmMerchantId: "paytm_merchant_id",
orderId: "order_id",
isStaging: true,
uniqueTransactionToken: "unique_id_database_refrences",
amount: 2500,
successListener: (UniPaymentResponse uniPaymentResponse) {
/// here manage code for success payment.
bool isSuccessPayment = uniPaymentResponse.paymentStatus;
if (isSuccessPayment) {
log(uniPaymentResponse.message);
log(uniPaymentResponse.paymentId);
}
},
failureListener: (UniPaymentResponse uniPaymentResponse) {
/// here manage code for failure or error in payment.
bool isFailedPayment = uniPaymentResponse.paymentStatus;
if (isFailedPayment) {
log(uniPaymentResponse.message);
log(uniPaymentResponse.paymentId);
}
},
);
copied to clipboard
Flutterwave #
await UniPayments.flutterWavePayment(
buildContext: context,
publicKey: 'add_public_ke',
encryptionKey: 'add_encryption_key',
currencyCode: 'NGN',
amount: '2500',
receiptantName: 'Test User',
emailId: '[email protected]',
phoneNumber: '1234567890',
isDebugMode: true,
redirectURL: 'add-redirect-url-here',
transactionRef: 'add-random-string-everytime-transaction-refrence',
successListener: (UniPaymentResponse uniPaymentResponse) {
/// here manage code for success payment.
bool isSuccessPayment = uniPaymentResponse.paymentStatus;
if (isSuccessPayment) {
log(uniPaymentResponse.message);
log(uniPaymentResponse.paymentId);
}
},
failureListener: (UniPaymentResponse uniPaymentResponse) {
/// here manage code for failure or error in payment.
bool isFailedPayment = uniPaymentResponse.paymentStatus;
if (isFailedPayment) {
log(uniPaymentResponse.message);
log(uniPaymentResponse.paymentId);
}
},
);
copied to clipboard
Googlepay #
UniPayments.uniPaymentGooglePayButton(
paymentConfigurationAsset: 'ENTER_ASSET_PATH',
height: 150,
width: 150,
uniPaymentItemStatus: UniPaymentItemStatus.pending,
uniPaymentItemTypes: UniPaymentItemTypes.item,
payableAmount: "ENTER_AMOUNT_HERE",
uniPaymentGoogleButtonStyle:
UniPaymentGoogleButtonStyle.flat,
uniPaymentGoogleButtonType:
UniPaymentGoogleButtonType.donate,
paymentLabel: "ENTER_LABLE_PAYMENT",
failureListener: (UniPaymentResponse paymentResponse) {
/// here manage code for failure or error in payment. ///
},
successListener: (UniPaymentResponse paymentResponse) {
/// here manage code for failure or error in payment. ///
},
onPressed: () {
print("Universal Google Pay Button Pressed");
},
),
copied to clipboard
Paypal Braintree #
UniPaymentResponse uniPaymentResponse =
await UniPayments.payPalBraintreePayment(
tokenizationKey: "enter_key_braintree_paypal",
amount: 5200,
emailId: '[email protected]',
name: 'uni payments',
countryCode: 'US',
currencyCode: 'USD');

copied to clipboard
Found this package useful? #
If you found this project useful, then please consider giving it a ⭐ on Github and sharing it with your friends via social media. Give a Star.
Contributions are welcome! Feel free to submit a pull request or open an issue for any feature requests or bugs, Create a Ticket.

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.