PaymobPaymentService class interface

A concrete implementation of PaymentService that integrates with Paymob’s payment API.

This service handles the full Paymob payment flow including:

  1. Authentication — obtaining an auth token using the API key.
  2. Order Creation — submitting an order with the user's cart items.
  3. Payment Key Generation — creating a secure session for the order.
  4. Redirect to Payment View — opening a webview to complete payment.

All exceptions are handled internally. You only need to provide the SetupPaymobPayment configuration.

Implemented types

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pay<T>({required T setupPayment}) Future<void>
Triggers the Paymob payment flow using the provided setupPayment configuration.
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

instance PaymobPaymentService
Singleton instance of PaymobPaymentService.
no setter