nimbbl_mobile_kit_flutter_webview_sdk 1.1.0-alpha.1 copy "nimbbl_mobile_kit_flutter_webview_sdk: ^1.1.0-alpha.1" to clipboard
nimbbl_mobile_kit_flutter_webview_sdk: ^1.1.0-alpha.1 copied to clipboard

Nimbbl Flutter WebView SDK for payment integration

Nimbbl Flutter WebView SDK - Merchant Integration Guide #

πŸŽ‰ Production Ready SDK - Simple Integration!

πŸš€ Release Announcement #

We're excited to announce the release of Nimbbl Flutter WebView SDK v1.1.0! 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
  • βœ… Semantic Versioning: Proper version management with alpha/beta releases
  • βœ… iOS WebView Integration: Full integration with iOS WebView SDK v2.0.11

What's New:

  • Streamlined API for easier integration
  • Comprehensive documentation with real-world examples
  • Optimized for Flutter 3.x compatibility
  • Semantic versioning with pre-release support
  • Enhanced iOS WebView SDK integration

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'),
        ),
      ),
    );
  }
}

πŸ”„ Version Management #

We use semantic versioning with automated version management:

# Create alpha release for testing
./scripts/version_manager.sh alpha

# Create stable release
./scripts/version_manager.sh patch

# Publish to pub.flutter-io.cn
./scripts/version_manager.sh publish

See VERSION_MANAGEMENT.md for complete documentation.

πŸ“š Documentation #