PayUnitButton class
Payunit Button
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- PayUnitButton
Constructors
-
PayUnitButton({Key? key, required String apiUsername, required String apiPassword, required String apiKey, required String mode, required String paymentCountry, required int totalAmount, required String currency, required dynamic actionAfterProccess(String transactionId, String transactionStatus, String phoneNumber, String transactionGateway), required String returnUrl, required String notifyUrl, String buttonText = 'Pay Now', Color buttonTextColor = Colors.white, Color color = Colors.orange, double width = double.infinity, dynamic onPaymentInitiated(String transactionId, String phoneNumber, String transactionGateway)?, Map<
String, dynamic> customFields = const {}}) -
Payunit Button
const
Properties
- actionAfterProccess → dynamic Function(String transactionId, String transactionStatus, String phoneNumber, String transactionGateway)
-
Function to execute when transaction is completed.
final
- apiKey → String
-
Your application token eg sand_xxxxxx or live_xxxxxx
final
- apiPassword → String
-
Your apiPassword is provided on your payunit dashboard and looks like "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
final
- apiUsername → String
-
Your apiUsername is provided on your payunit dashboard and looks like "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
final
-
The text for the Pay Button
final
-
Text color of the Pay Button
final
- color → Color
-
Background color of the Pay Button
final
- currency → String
-
The currency you want to use: XAF
final
-
customFields
→ Map<
String, dynamic> -
Optional Custom fields to track transactions
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- mode → String
-
live or test. The current mode of your application
final
- notifyUrl → String
-
Notification webhook of the payment result to your server by payunit
final
- onPaymentInitiated → dynamic Function(String transactionId, String phoneNumber, String transactionGateway)?
-
Function to execute immediately after payment initiation.
final
- paymentCountry → String
-
Country code used to display only providers of that country. eg: CM
final
- returnUrl → String
-
The url or the endpoint the customer will be redirected to at the end of the payment
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- totalAmount → int
-
Total amount to be paid
final
- width → double
-
Width of the Pay Button
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< PayUnitButton> -
Creates the mutable state for this widget at a given location in the tree.
override
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited