littlefish_payments_cash 5.0.8 copy "littlefish_payments_cash: ^5.0.8" to clipboard
littlefish_payments_cash: ^5.0.8 copied to clipboard

discontinued

Cash payment gateway — enables manual cash transaction processing (purchase, refund, withdrawal). Self-contained concrete implementation of CashPaymentsGateway.

littlefish_payments_cash #

Cash payment gateway for the LittleFish payments ecosystem. Provides a concrete implementation of CashPaymentsGateway for processing manual cash transactions.

Architecture #

littlefish_payments_cash
├── gateway/
│   └── cash_payment_gateway.dart    # LittleFishCashPaymentGateway
└── models/
    ├── cash_payment_result.dart      # CashPaymentResult extends PaymentResult
    └── cash_provider.dart            # CashProvider extends PaymentProvider

Components #

LittleFishCashPaymentGateway #

Extends CashPaymentsGateway (from littlefish_payments) with four implemented operations:

Operation Description
processPurchase Basic cash purchase
processPurchaseWithCash Purchase with explicit cash amount tracking
processRefundByAmount Amount-based cash refund
processWithdrawByAmount Cash withdrawal

All operations validate authentication and business/merchant IDs before processing.

CashPaymentResult #

Extends PaymentResult with cash-specific defaults (entry mode = manual, payment method = cash). Includes a CashPaymentResult.failed() factory for error scenarios.

CashProvider #

Extends PaymentProvider with PaymentProviderType.cash. No external configuration or SDK integration required.

Usage #

import 'package:littlefish_payments_cash/littlefish_payments_cash.dart';

final gateway = LittleFishCashPaymentGateway('my_app');
await gateway.initialise();

final result = await gateway.processPurchase(
  businessId: 'BUS_123',
  merchantId: 'MER_456',
  amount: Decimal.parse('100.00'),
  isoCurrencyCode: 'ZAR',
  transactionId: 'TXN_789',
  reference: 'REF_001',
);

Dependencies #

  • littlefish_core — Auth service, logger service
  • littlefish_paymentsCashPaymentsGateway base class, PaymentResult, PaymentProvider
  • decimal — Monetary arithmetic
  • uuid — Transaction ID generation
  • littlefish_payments — Core payment abstractions
  • littlefish_payments_pos_ar — African Resonance POS gateway
  • littlefish_payments_cloud_pos — Cloud POS gateway
0
likes
130
points
19
downloads

Documentation

API reference

Publisher

verified publisherlittlefishapp.com

Weekly Downloads

Cash payment gateway — enables manual cash transaction processing (purchase, refund, withdrawal). Self-contained concrete implementation of CashPaymentsGateway.

Homepage

License

(pending) (license)

Dependencies

decimal, equatable, flutter, flutter_bloc, littlefish_core, littlefish_payments, uuid

More

Packages that depend on littlefish_payments_cash