PaystackService class

A service class to interact with the Paystack payment API.

Constructors

PaystackService({required String secretKey})
Paystack Service Class initialization

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
secretKey String
User Paystack Secret key
final

Methods

handleTransaction({required String email, required int amount, required String callbackUrl, String? reference, List<String>? channels, String currency = 'NGN', required Future<PaystackTransactionResult> openWebView(String authorizationUrl)}) Future<Map<String, dynamic>>
Handles the payment process and verifies the transaction automatically.
initializeTransaction({required String email, required int amount, required String callbackUrl, String? reference, List<String>? channels, String currency = 'NGN'}) Future<PaystackResponse>
Initializes a Paystack transaction.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
verifyTransaction(String reference) Future<PaystackResponse>
Verifies a Paystack transaction by reference.

Operators

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