AmwalWalletSdk class
Main SDK class for Amwal Wallet payment integration.
This class provides the primary interface for integrating Amwal's wallet-based payment solutions into Flutter applications. It handles initialization, configuration, and provides access to wallet payment features including QR code payments, mobile wallet integration, and alias-based payments.
Features
- QR Code Payments: Generate and scan QR codes for payments
- Mobile Wallet Integration: Support for various mobile wallet providers
- Alias Payments: Pay using phone numbers or email addresses
- Multi-Terminal Support: Handle multiple payment terminals
- Secure Authentication: Token-based authentication with optional secure hash
- Localization: Support for multiple languages and locales
- Mock Mode: Development-friendly testing with mock responses
Initialization
The SDK must be initialized before use with merchant credentials and configuration:
final walletSdk = await AmwalWalletSdk.instance.init(
token: 'your_auth_token',
merchantId: 'merchant_123',
terminalIds: ['terminal_1', 'terminal_2'],
transactionRefNo: 'ref_456',
service: networkService,
merchantName: 'My Store',
locale: Locale('en', 'US'),
);
Usage Flow
- Initialize: Call
init()
with required parameters - Configure: Set up payment arguments and settings
- Present UI: Use
navigateToWalletScreen()
to show payment interface - Handle Results: Process payment callbacks and results
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
-
init(
{required String token, required String merchantId, required List< String> terminalIds, String? secureHashValue, required String transactionRefNo, required NetworkService service, String? merchantName, bool isMocked = false, Locale? locale}) → Future<AmwalWalletSdk> - Initialize the Amwal Wallet SDK with merchant configuration.
- Navigate to the wallet payment screen with countdown functionality.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance → AmwalWalletSdk
-
Returns the singleton instance of AmwalWalletSdk.
no setter