FlutterHyperPay class

Main entry point for the HyperPay Payment SDK.

Create one instance per screen/session and call the appropriate method depending on the payment flow you want to use (Ready UI, Custom UI, Google Pay, Samsung Pay, Apple Pay, or stored cards).

final hyperPay = FlutterHyperPay(
  shopperResultUrl: 'com.example.app',
  paymentMode: PaymentMode.test,
  lang: 'en',
);

Constructors

FlutterHyperPay({required String shopperResultUrl, required PaymentMode paymentMode, required String lang})
Creates a FlutterHyperPay instance.

Properties

channelName String
The name of the platform channel used for communication with native code.
final
hashCode int
The hash code for this object.
no setterinherited
lang String
The language used for the payment interface (e.g., "en", "ar").
final
paymentMode PaymentMode
The payment mode to be used: PaymentMode.test or PaymentMode.live.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shopperResultUrl String
The URL used by the payment gateway to redirect the user back to the app after a payment.
final

Methods

customUICards({required CustomUI customUI}) Future<PaymentResultData>
This method is used for making custom UI payments with cards. It takes in the required CustomUI input and returns a PaymentResultData object.
customUISTC({required CustomUISTC customUISTC}) Future<PaymentResultData>
This function is used to do payment using custom UI. It takes "CustomUI" as an argument, which consists of the brand name, checkout id, card number, holder name, month, year and cvv. The function returns a Future of PaymentResultData.
googlePayUI({required GooglePayUI googlePayUI}) Future<PaymentResultData>
Initiates a Google Pay payment on Android.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
payWithSoredCards({required StoredCards storedCards}) Future<PaymentResultData>
This function allows the user to make payments using their stored cards. It accepts an argument of type StoredCards and makes a call to the implementPaymentStoredCards function with the values required for the payment.
readyUICards({required ReadyUI readyUI}) Future<PaymentResultData>
This async function takes a ReadyUI object as input and returns a Future object of type PaymentResultData. It implements a payment operation by passing the Brand name, Checkout ID, Shopper Result URL, Payment Channel name, Payment mode, Language, Theme color in HEX (iOS), and a flag to set the store payment details mode. The function waits for the payment operation to complete and returns the resulting PaymentResultData.
requestBrands({required String checkoutId}) Future<List<String>>
Requests card brand detection for a given checkout ID (BIN lookup).
samsungPayUI({required SamsungPayUI samsungPayUI}) Future<PaymentResultData>
Initiates a Samsung Pay payment on Android.
toString() String
A string representation of this object.
inherited

Operators

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