bank_alfalah_payment_gateway_integration 0.0.2
bank_alfalah_payment_gateway_integration: ^0.0.2 copied to clipboard
Bank Alfalah payment gateway integration flutter
🚀 Bank Alfalah Payment Gateway Integration #
This Flutter package allows seamless integration with Bank Alfalah's Payment Gateway.
Ensure that your merchant account is in production mode, as sandbox credentials will not work.
📦 Installation #
Add the package to your pubspec.yaml:
dependencies:
bank_alfalah_payment_gateway_integration: latest_version
Run:
flutter pub get
🛠 Usage #
Import the package:
import 'package:bank_alfalah_payment_gateway_integration/bank_alfalah_payment_gateway_integration.dart';
Use the AlfalahPaymentIntegration widget:
AlfalahPaymentIntegration(
onSuccess: () {
//Enter your logic here
print("✅ Payment Successful!");
},
onFailure: () {
//Enter your logic here
print("❌ Payment Failed!");
},
merchantDetails: myMerchantDetails, // Provide your production merchant details
transAmount: "1000", // Transaction amount
);
📌 Parameters #
| Parameter | Type | Description |
|---|---|---|
onSuccess |
VoidCallback |
Callback function triggered when payment is successful |
onFailure |
VoidCallback |
Callback function triggered when payment fails |
merchantDetails |
PaymentModel |
Merchant credentials (API Key, Merchant ID, etc.) |
transAmount |
String |
Transaction amount in PKR |
🌟 Features #
✔️ Easy integration with Bank Alfalah Payment Gateway
✔️ Handles success & failure callbacks
✔️ Supports WebView-based payment flow
✔️ Optimized for Flutter apps
📜 Example #
A complete example is available in the example/ directory.
📝 License #
This project is licensed under the MIT License. See the LICENSE file for details.