flutter_hyperpay library

Classes

CustomUI
This class is used to define a CustomUI object which is used to make payments using the PaymentConst. customUi payment type. It has parameters to define the checkoutId, brandName, cardNumber, holderName, month, year, cvv and enabledTokenization (optional).
CustomUISTC
Class CustomUISTC is used to store the payment type, checkout ID, and phone number for custom UI payment.
FlutterHyperPay
PaymentBrands
This class contains constants representing various payment brands, such as mada, applePay, credit, stcPay, masterCard, and visa.
PaymentConst
This class contains different constants used in Payment APIs including Apple Pay, Ready UI, Custom UI, Custom UI STC, Stored Cards, Method Call, Success, Error, and Sync.
PaymentLang
This class is used to store the language constants used for Payment. Constants include iOS's Arabic (ar) and English (en) and Android's English (en_US) and Arabic (ar_AR).
PaymentResultData
This class holds the data for a payment result, containing an errorString (nullable) and a paymentResult object.
PaymentResultManger
PaymentResultManger is a class used to generate a PaymentResultData object based on the paymentResult passed. It will return the respective paymentResult with the errorString depending on the paymentResult passed.
ReadyUI
ReadyUI class holds all the necessary data related to the ReadyUI payment method which is used in PaymentConst. It is required to provide checkoutId when initializing the class. Also, we can provide brandName and themColorHexIOS as optional values. setStorePaymentDetailsMode is set to false by default.
StoredCards
This is the class for StoredCards. It has fields to store payment type, checkoutId, tokenId, brandName and cvv. PaymentType is set to the PaymentConst.readyUi, checkoutId and tokenId are required fields and brandName and cvv are optional fields.

Enums

PaymentMode
PaymentMode is an enumeration which can take on the values of either 'live' or 'test' and is used to indicate which payment mode is used.
PaymentResult
This enum is used to store the result of a Payment operation. It can be either 'sync', 'success', 'error' or 'noResult'.