nimbbl_mobile_kit_flutter_webview_sdk 1.0.13
nimbbl_mobile_kit_flutter_webview_sdk: ^1.0.13 copied to clipboard
Nimbbl Flutter WebView SDK for payment integration
Nimbbl Flutter SDK - Merchant Integration Guide #
π Production Ready SDK - Simple Integration!
π Release Announcement #
We're excited to announce the release of Nimbbl Flutter SDK v1.0.11! This major update brings:
- β Simplified Integration: Get started with just 3 lines of code
- β Production Ready: Battle-tested with thousands of successful transactions
- β Complete Flutter Support: Full widget implementation examples
- β Enhanced Error Handling: Better debugging and error management
- β Improved Performance: Faster initialization and payment processing
What's New:
- Streamlined API for easier integration
- Comprehensive documentation with real-world examples
- Optimized for Flutter 3.x compatibility
Ready to integrate? Let's get started! π
Quick Start (3 Lines of Code) #
1. Add Dependency #
dependencies:
nimbbl_mobile_kit_flutter_webview_sdk: ^1.0.11
2. Initialize SDK #
await NimbblCheckoutSDK.instance.initialize();
3. Process Payment #
final result = await NimbblCheckoutSDK.instance.checkout(
CheckoutOptions(orderToken: "your_order_token_from_backend")
);
// Handle payment result
if (result['status'] == 'success') {
print('Payment successful!');
print('Payment ID: ${result['payment_id']}');
} else if (result['status'] == 'failed') {
print('Payment failed: ${result['message']}');
} else if (result['status'] == 'cancelled') {
print('Payment cancelled by user');
}
Complete Integration Example #
Here's a complete Flutter widget implementation showing how to integrate the Nimbbl SDK:
import 'package:flutter/material.dart';
import 'package:nimbbl_mobile_kit_flutter_webview_sdk/nimbbl_checkout_sdk.dart';
import 'package:nimbbl_mobile_kit_flutter_webview_sdk/types.dart';
class PaymentScreen extends StatefulWidget {
@override
_PaymentScreenState createState() => _PaymentScreenState();
}
class _PaymentScreenState extends State<PaymentScreen> {
bool _isLoading = false;
@override
void initState() {
super.initState();
_initializeSDK();
}
// Step 1: Initialize SDK
Future<void> _initializeSDK() async {
// Initialize with default configuration
await NimbblCheckoutSDK.instance.initialize();
}
// Step 2: Process Payment
Future<void> _processPayment() async {
setState(() => _isLoading = true);
try {
final options = CheckoutOptions(
orderToken: "your_order_token_from_backend",
);
final result = await NimbblCheckoutSDK.instance.checkout(options);
if (result['status'] == 'success') {
print('Payment successful!');
print('Payment ID: ${result['payment_id']}');
} else if (result['status'] == 'failed') {
print('Payment failed: ${result['message']}');
}
} catch (e) {
print('Error: $e');
} finally {
setState(() => _isLoading = false);
}
}
@override
Widget build(BuildContext context) {
return Scaffold(
body: Center(
child: ElevatedButton(
onPressed: _isLoading ? null : _processPayment,
child: _isLoading ? CircularProgressIndicator() : Text('Pay Now'),
),
),
);
}
}