makePayment method
Future<Map<String, dynamic> >
makePayment({
- required String amount,
- required String currencyCode,
- required String customerName,
- required String customerEmail,
- String? customerPhoneNumber,
- required String paymentReference,
- required String paymentDescription,
- required PaymentMethod paymentMethod,
override
Implementation
@override
Future<Map<String, dynamic>> makePayment(
{required String amount,
required String currencyCode,
required String customerName,
required String customerEmail,
String? customerPhoneNumber,
required String paymentReference,
required String paymentDescription,
required PaymentMethod paymentMethod}) async {
final map = PaymentModel(
amount: amount,
currencyCode: currencyCode,
customerName: customerName,
paymentDescription: paymentDescription,
paymentReference: paymentReference,
customerEmail: customerEmail,
customerPhoneNumber: customerPhoneNumber,
paymentMethod: paymentMethod)
.toMap();
try {
final result = await methodChannel.invokeMapMethod<String, String>(
AppStrings.makeMonnifyPayment, map);
return await Future.value(result);
} catch (error) {
rethrow;
}
}