PaylinkAPI class abstract

A class to interact with the Paylink API.

Inheritance
Implementers

Constructors

PaylinkAPI({bool isTestMode = false, String? apiId, String? secretKey})
Initializes the PaylinkAPI with optional test mode, API ID, and secret key.

Properties

apiId → String?
Production API credentials.
final
API endpoints for production and test environments.
getter/setter pair
hashCode → int
The hash code for this object.
no setterinherited
isTestMode → bool
Indicates whether the API is in test mode.
final
paymentFrameUrl ↔ String
API endpoints for production and test environments.
getter/setter pairinherited
paymentToken ↔ String?
Payment token obtained after authentication.
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
secretKey → String?
Production API credentials.
final

Methods

addInvoice({required double amount, required String clientMobile, required String clientName, String? clientEmail, required String orderNumber, required String callBackUrl, String? cancelUrl, String? currency, required List<PaylinkProduct> products, String? note, String? smsMessage, List<String>? supportedCardBrands, bool displayPending = true}) → Future<Map<String, dynamic>>
Add invoice to Paylink.
cancelInvoice({String? transactionNo}) → Future<void>
Cancel invoice from Paylink.
filterCardBrands(List<String>? supportedCardBrands) → List<String>
inherited
getApiId(String? productionApiId, bool isTesting) → String?
inherited
inherited
getInvoice({String? transactionNo}) → Future<Map<String, dynamic>>
Retrieves invoice details from the Paylink API.
getPaymentFrameUrl(bool isTesting) → String
inherited
getPaymentPageUrl(String? transactionNo, String? clientName, String? clientMobile) → String
Generates the payment page URL for a transaction. transactionNo - The transaction number for which to generate the payment URL. clientName - The name of the client making the payment. clientMobile - The mobile number of the client making the payment. Returns the payment page URL.
inherited
getSecretKey(String? productionSecretKey, bool isTesting) → String?
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
paymentErrorsToMap(dynamic data) → Map<String, dynamic>
Converts payment error data to a map format. data - The payment error data to be converted. Returns a map containing the converted payment errors.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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