dimepay_flutter_sdk 1.1.2 copy "dimepay_flutter_sdk: ^1.1.2" to clipboard
dimepay_flutter_sdk: ^1.1.2 copied to clipboard

Official Flutter SDK for integrating Dime Pay.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:dimepay_flutter_sdk/dimepay_flutter_sdk.dart';

void main() {
  runApp(const MaterialApp(home: DimePayExample()));
}

class DimePayExample extends StatelessWidget {
  const DimePayExample({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: const Text('DimePay Flutter')),
      body: DimePayWebView(
        total: 5000,
        currency: "JMD",
        test: true,
        orderId: "c23a0f2c-0921-4280-a539-1e13458f3ff2",
        clientId: "ck_lVyb3-vdLQifn9icgA-i38KxY-2E9",
        data:
            "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjcwOWM0MzBlLTNhNWMtNGI0OS04OGQzLTMzYjgzOWU1NjQ0ZSIsInRvdGFsIjo1MDAwLCJzdWJ0b3RhbCI6NTAwMCwiZGVzY3JpcHRpb24iOiJUaGlzIGlzIGFuIG9yZGVyIGZyb20gdGhlIHNkayIsInRheCI6MCwiY3VycmVuY3kiOiJKTUQiLCJmZWVzIjpbXSwiaXRlbXMiOltdLCJmdWxmaWxsZWQiOnRydWUsInNoaXBwaW5nUGVyc29uIjp7Im5hbWUiOiJTaGFtaXIgU2FkZGxlciIsInN0cmVldCI6IjEgVGVzdCBBdmUiLCJjaXR5IjoiS2luZ3N0b24gNiIsInN0YXRlT3JQcm92aW5jZU5hbWUiOiJLaW5nc3RvbiIsInBvc3RhbENvZGUiOiIwMDAwMCIsImNvdW50cnlOYW1lIjoiSmFtYWljYSJ9LCJiaWxsaW5nUGVyc29uIjp7Im5hbWUiOiJTaGFtaXIgU2FkZGxlciIsInN0cmVldCI6IjEgVGVzdCBBdmUiLCJjaXR5IjoiS2luZ3N0b24gNiIsInN0YXRlT3JQcm92aW5jZU5hbWUiOiJLaW5nc3RvbiIsInBvc3RhbENvZGUiOiIwMDAwMCIsImNvdW50cnlOYW1lIjoiSmFtYWljYSJ9LCJpYXQiOjE3NDY3NjQ0NzV9.3THBgS1TVwhapPpEdmULapw7izsOct5nlTH_zsP7lWs",
        payment_methods: DimePayMethods(
          apple_pay: true,
          google_pay: true,
          samsung_pay: true,
        ),
        styles: DimePayStyles(
          primaryColor: "#936c6c",
          buttonColor: "#936c6c",
          buttonTextColor: "#FFFFFF",
          backgroundColor: "#FFFFFF",
          noBorderRadius: false,
          labelTextColor: "#0000FF",
        ),
        onReady: (data) => debugPrint("Ready: $data"),
        onSuccess: (data) => debugPrint("Success: $data"),
        onFailed: (err) => debugPrint("Failed: $err"),
        onError: (err) => debugPrint("Error: $err"),
        onCancel: () => debugPrint("Cancelled"),
        onLoading: () => debugPrint("Loading..."),
      ),
    );
  }
}
0
likes
130
points
310
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Official Flutter SDK for integrating Dime Pay.

Homepage

License

MIT (license)

Dependencies

flutter, flutter_inappwebview, webview_flutter

More

Packages that depend on dimepay_flutter_sdk

Packages that implement dimepay_flutter_sdk