pay abstract method

Future<PaymentResult> pay({
  1. required BuildContext context,
  2. required int amountSmallestUnit,
  3. required String email,
  4. String currency = 'NGN',
  5. String? reference,
})

Starts a payment flow and returns a PaymentResult.

Parameters:

  • context: Used to push any UI needed for checkout (e.g., a WebView route).
  • amountSmallestUnit: Amount to charge in the smallest unit of the currency (for NGN, kobo; ₦1,500 = 150000).
  • email: The customer’s email, passed to the provider.
  • currency: ISO currency code (defaults to "NGN").
  • reference: Optional transaction reference. If not provided, the gateway should generate one.

Returns:

Implementation

Future<PaymentResult> pay({
  required BuildContext context,
  required int amountSmallestUnit,
  required String email,
  String currency = 'NGN',
  String? reference,
});