submitMobileMoneyProcessPayment method
Implementation
Future<IMobileMoneyProcessingRequestResponse> submitMobileMoneyProcessPayment(
{required Map<String, dynamic> body, required String token}) async {
try {
Map<String, String> headers = {
"mb-token": token,
};
String url = "/pay/submit-mobilemoney-payment";
final resp = await postWithDio(url, body: body, headers: headers);
debugPrint("$resp");
var response = IMobileMoneyProcessingRequestResponse.fromJson(resp);
return response;
} catch (e, stack) {
debugPrint('Error during submit mobile money: $e');
debugPrint('Stack trace: $stack');
return IMobileMoneyProcessingRequestResponse(
binStatus: EApiResponseStatusCode.bIN001,
extraInfo: IExtraInfo(
pourcent: 100,
status: "exception",
subtitle:
"Une erreur est survenue lors de cette opération, veuillez réessayer",
success: false,
title: "Oups !",
),
message:
"Une erreur est survenue lors de cette opération, veuillez réessayer",
systemRef: '');
}
}