initialize method
Future<bool>
initialize({
- required List<
FawryItem> items, - String? merchantRefNumber,
- String? customerProfileId,
- int? paymentExpiry,
- String? returnUrl,
- bool? authCaptureModePayment,
- Map<
String, dynamic> ? customParam,
override
Initialize FawryPay payment charge.
Initialize the payment charge by adding some parameters.
Returns true
if it initialized fine.
Throws exception if not.
items
sets the list of items that the user will pay for.
merchantRefNumber
sets an optional number consists of 16 random characters and numbers.
customerProfileId
sets an optional profile id (Only Web).
paymentExpiry
sets the time in which it will expire this payment (Only Web).
returnUrl
sets return url which will go back after payment completed (Only Web & Must include if using Cards).
authCaptureModePayment
sets auth capture mode payment (Only Web).
customParam
sets a map of custom data you want to receive back with result data after payment.
Implementation
@override
Future<bool> initialize({
required List<FawryItem> items,
String? merchantRefNumber,
String? customerProfileId,
int? paymentExpiry,
String? returnUrl,
bool? authCaptureModePayment,
Map<String, dynamic>? customParam,
}) async {
return await FlutterFawryPayPlatform.instance.initialize(
items: items,
merchantRefNumber: merchantRefNumber,
customerProfileId: customerProfileId,
paymentExpiry: paymentExpiry,
returnUrl: returnUrl,
authCaptureModePayment: authCaptureModePayment,
customParam: customParam,
);
}