Buzapay class
Main entry point for the Buzapay SDK
Initialize the SDK once at app startup:
void main() {
Buzapay.initialize(
config: BuzapayConfig(
merchantId: 'YOUR_MERCHANT_ID',
environment: BuzapayEnvironment.sandbox,
),
);
runApp(MyApp());
}
Properties
- config → BuzapayConfig
-
Get the current configuration
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
checkout(
{required BuildContext context, required int amount, required String currency, required String email, required String phoneNumber, required String redirectUrl, String? merchantReference, String? narration, void onComplete(String? reference)?}) → Future< PaymentResult?> - Open checkout in a WebView
-
dispose(
) → void - Dispose SDK resources
-
generatePaymentLink(
{required String email, required String phoneNumber, required String amount, required String currency, required String redirectUrl, String? merchantReference, String? narration, String? linkName}) → Future< PaymentLinkResponse> - Generate a payment link
-
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 → Buzapay
-
Get the SDK instance
no setter
- isInitialized → bool
-
Check if SDK is initialized
no setter
Static Methods
-
initialize(
{required BuzapayConfig config}) → void - Initialize the Buzapay SDK